targets/Win32/plc_Win32_main.c
branchsvghmi
changeset 3296 3bcd5ec67521
parent 3295 0375d801fff7
child 3731 549763a28934
equal deleted inserted replaced
3295:0375d801fff7 3296:3bcd5ec67521
    24     }
    24     }
    25     LeaveCriticalSection(&Atomic64CS);
    25     LeaveCriticalSection(&Atomic64CS);
    26     return res;
    26     return res;
    27 }
    27 }
    28 
    28 
    29 struct _timeb timetmp;
    29 struct timeb timetmp;
    30 void PLC_GetTime(IEC_TIME *CURRENT_TIME)
    30 void PLC_GetTime(IEC_TIME *CURRENT_TIME)
    31 {
    31 {
    32 	_ftime(&timetmp);
    32 	ftime(&timetmp);
    33 
    33 
    34 	(*CURRENT_TIME).tv_sec = timetmp.time;
    34 	(*CURRENT_TIME).tv_sec = timetmp.time;
    35 	(*CURRENT_TIME).tv_nsec = timetmp.millitm * 1000000;
    35 	(*CURRENT_TIME).tv_nsec = timetmp.millitm * 1000000;
    36 }
    36 }
    37 
    37