#include <windows.h>
#include <stdio.h>
#define ALLNUM 10000000
void testlock()
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; InterlockedIncrement(&i))
;
printf("locked model use time %d/n", GetTickCount() - timecode);
}
void testunlock()
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; i++)
;
printf("unlock model use time %d/n", GetTickCount() - timecode);
{
int timecode = GetTickCount();
for(long i=0; i<ALLNUM; i++)
;
printf("unlock model use time %d/n", GetTickCount() - timecode);
}
HANDLE sema;