mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
port perfnotes to windows. addresses #1246
git-svn-id: file:///svn/toku/tokudb.1032b@8054 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
755bb35712
commit
236adb1bd0
2 changed files with 20 additions and 0 deletions
14
windows/tests/test-gettimeofday.c
Normal file
14
windows/tests/test-gettimeofday.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <toku_time.h>
|
||||
|
||||
int main(void) {
|
||||
int r;
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
|
||||
r = gettimeofday(&tv, 0);
|
||||
assert(r == 0);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,12 +1,18 @@
|
|||
#ifndef TOKU_TIME_H
|
||||
#define TOKU_TIME_H
|
||||
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Reference in a new issue