equal
deleted
inserted
replaced
1 #include <stdio.h> |
1 #include <stdio.h> |
2 #include <sys/timeb.h> |
2 #include <sys/timeb.h> |
3 #include <time.h> |
3 #include <time.h> |
4 #include <windows.h> |
4 #include <windows.h> |
5 |
5 |
6 int localcount = 0; |
6 long AtomicCompareExchange(long* atomicvar,long exchange, long compared) |
|
7 { |
|
8 return InterlockedCompareExchange(atomicvar, exchange, compared); |
|
9 } |
|
10 |
|
11 //long AtomicExchange(long* atomicvar,long exchange) |
|
12 //{ |
|
13 // return InterlockedExchange(atomicvar, exchange); |
|
14 //} |
7 |
15 |
8 struct _timeb timetmp; |
16 struct _timeb timetmp; |
9 void PLC_GetTime(IEC_TIME *CURRENT_TIME) |
17 void PLC_GetTime(IEC_TIME *CURRENT_TIME) |
10 { |
18 { |
11 _ftime(&timetmp); |
19 _ftime(&timetmp); |