comparison base/System.cpp @ 0:da6937383da8

initial import
author Chris Cannam
date Tue, 10 Jan 2006 16:33:16 +0000
parents
children d86891498eef
comparison
equal deleted inserted replaced
-1:000000000000 0:da6937383da8
1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 A waveform viewer and audio annotation editor.
5 Chris Cannam, Queen Mary University of London, 2005
6
7 This is experimental software. Not for distribution.
8 */
9
10 #include "System.h"
11
12 #ifdef _WIN32
13
14 extern "C" {
15
16 void gettimeofday(struct timeval *tv, void *tz)
17 {
18 union {
19 long long ns100;
20 FILETIME ft;
21 } now;
22
23 GetSystemTimeAsFileTime(&now.ft);
24 tv->tv_usec = (long)((now.ns100 / 10LL) % 1000000LL);
25 tv->tv_sec = (long)((now.ns100 - 116444736000000000LL) / 10000000LL);
26 }
27
28 }
29
30 #endif