blob: 8633b8d1ec0d9094fe58c70117ff5771990c85de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*-
* Copyright (c) 2014-2016 MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "wt_internal.h"
/*
* __wt_sleep --
* Pause the thread of control.
*/
void
__wt_sleep(uint64_t seconds, uint64_t micro_seconds)
{
struct timeval t;
t.tv_sec = (time_t)(seconds + micro_seconds / WT_MILLION);
t.tv_usec = (suseconds_t)(micro_seconds % WT_MILLION);
(void)select(0, NULL, NULL, NULL, &t);
}
|