Chris@49: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: /* Chris@52: Sonic Visualiser Chris@52: An audio file viewer and annotation editor. Chris@52: Centre for Digital Music, Queen Mary, University of London. Chris@52: This file copyright 2006 Chris Cannam. Chris@0: Chris@52: This program is free software; you can redistribute it and/or Chris@52: modify it under the terms of the GNU General Public License as Chris@52: published by the Free Software Foundation; either version 2 of the Chris@52: License, or (at your option) any later version. See the file Chris@52: COPYING included with this distribution for more information. Chris@0: */ Chris@0: Chris@0: #include "System.h" Chris@0: Chris@0: #ifdef _WIN32 Chris@0: Chris@0: extern "C" { Chris@0: Chris@0: void gettimeofday(struct timeval *tv, void *tz) Chris@0: { Chris@0: union { Chris@0: long long ns100; Chris@0: FILETIME ft; Chris@0: } now; Chris@0: Chris@0: GetSystemTimeAsFileTime(&now.ft); Chris@0: tv->tv_usec = (long)((now.ns100 / 10LL) % 1000000LL); Chris@0: tv->tv_sec = (long)((now.ns100 - 116444736000000000LL) / 10000000LL); Chris@0: } Chris@0: Chris@0: } Chris@0: Chris@0: #endif