Why does resamp change the interval

hi~
I’m sorry to ask this question,maybe it’s probably simple and worthless ,But I’m a beginner and it does bother me for a long time .
My mne vision is 1.0.1 , operating system is Windows 10.
I use the function resample for resampling, my original data was 1000Hz, and I want it to be 500Hz. * Using this function it does go down to 500hz, however, the time between markers is also reduced by half, and the total time of my experiment also was cut in half.
for example:

data_path = "C:/Users/hanwenhao/Desktop/搬运/20220315_01YJ_02.cnt"#设置路径
raw = mne.io.read_raw_cnt(data_path,preload=True)#读取文件
print(raw)
print(raw.info)
print(raw.annotations.to_data_frame)
events,event_id = mne.events_from_annotations(raw)
print(events.shape, event_id)
<RawCNT | 20220315_01YJ_02.cnt, 66 x 791280 (791.3 s), ~398.5 MB, data loaded>
<Info | 8 non-empty values
 bads: []
 ch_names: FP1, FPZ, FP2, AF3, AF4, F7, F5, F3, F1, FZ, F2, F4, F6, F8, ...
 chs: 66 EEG
 custom_ref_applied: False
 highpass: 0.0 Hz
 lowpass: 500.0 Hz
 meas_date: unspecified
 nchan: 66
 projs: []
 sfreq: 1000.0 Hz
 subject_info: 5 items (dict)

Below is the data for Events

37752	0	1
39705	0	2
40420	0	3
41955	0	4
42472	0	5
43090	0	2
43807	0	3
45342	0	4
45859	0	5
46477	0	2
47194	0	3

Then,I running resample code.

raw_for_resample=raw.copy().resample(500)  
print(raw_for_resample)
print(raw_for_resample)
print(raw.annotations.to_data_frame)
events,event_id = mne.events_from_annotations(raw_for_resample)

out

<RawCNT | 20220315_01YJ_02.cnt, 66 x 395640 (791.3 s), ~199.3 MB, data loaded>
<Info | 8 non-empty values
 bads: []
 ch_names: FP1, FPZ, FP2, AF3, AF4, F7, F5, F3, F1, FZ, F2, F4, F6, F8, ...
 chs: 66 EEG
 custom_ref_applied: False
 highpass: 0.0 Hz
 lowpass: 250.0 Hz
 meas_date: unspecified
 nchan: 66
 projs: []
 sfreq: 500.0 Hz
 subject_info: 5 items (dict)
>

Below is the data for Events from raw after resample

18876	0	1
19852	0	2
20210	0	3
20978	0	4
21236	0	5
21545	0	2
21904	0	3
22671	0	4
22930	0	5
23238	0	2
23597	0	3

I just want to change the sampling,not the interval time and total time, I don’t know what mistakes did I make in my work , I really appreaciate it if you could help me with this problem.

the events code time in samples so it’s normal that it’s reduced by 2 by resampling.

to me there is no issue with what you did.

Alex

thanks for your apply.
I already understand it ,thank you very much