28 #if defined(_MSC_VER) || defined(__MINGW32__)
66 ok = QueryPerformanceFrequency(&f);
assert(ok);
67 realTime_freq = 1.0 / (__int64)(((ABC_UINT64_T)f.LowPart) | ((ABC_UINT64_T)f.HighPart << 32));
69 ok = QueryPerformanceCounter(&t);
assert(ok);
70 return (ABC_UINT64_T)(__int64)(((__int64)(((ABC_UINT64_T)t.LowPart | ((ABC_UINT64_T)t.HighPart << 32))) * realTime_freq * 1000000000));
89 int tmpFile(
const char* prefix,
const char* suffix,
char** out_name)
91 #if defined(_MSC_VER) || defined(__MINGW32__)
94 for (i = 0; i < 10; i++){
96 fd = _open(*out_name, O_CREAT | O_EXCL | O_BINARY | O_RDWR, _S_IREAD | _S_IWRITE);
108 assert(*out_name != NULL);
109 sprintf(*out_name,
"%sXXXXXX", prefix);
110 fd = mkstemp(*out_name);
118 strcat(*out_name, suffix);
119 fd = open(*out_name, O_CREAT | O_EXCL | O_RDWR, S_IREAD | S_IWRITE);
174 static FILE* dummy_file = NULL;
177 #if !defined(_MSC_VER) && !defined(__MINGW32)
178 dummy_file = fopen(
"/dev/null",
"wb");
180 dummy_file = fopen(
"NUL",
"wb");
184 #if defined(__va_copy)
185 __va_copy(args_copy, args);
188 va_copy(args_copy, args);
193 n = vfprintf(dummy_file, format, args);
197 vsprintf(ret, format, args);
198 #if !defined(__va_copy) && defined(va_copy)
209 va_start(args, format);
int tmpFile(const char *prefix, const char *suffix, char **out_name)
char * vnsprintf(const char *format, va_list args)
#define ABC_ALLOC(type, num)
char * nsprintf(const char *format,...)
#define ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_START
static ABC_NAMESPACE_IMPL_START ABC_UINT64_T realTimeAbs()
DECLARATIONS ///.