singrdk/base/Windows/Benchmarks/CreateProcess/Child.c

28 lines
513 B
C
Raw Normal View History

2008-11-17 18:29:00 -05:00
#include <winlean.h>
#include <stdio.h>
#define GetCycleCount() __rdtsc()
ULONG64
__rdtsc(VOID);
#pragma intrinsic(__rdtsc)
int __cdecl
main()
{
ULONG64 n = GetCycleCount();
int r = -1;
FILE *f = fopen("result.txt", "w");
if (f != NULL)
{
//
// File format is tied to CreateProcess.c - do not
// change here without updating there
//
r = fprintf(f, "child start at:\n%llu\n", n);
fclose(f);
}
return r;
}