summaryrefslogtreecommitdiff
path: root/src/os_posix/os_sleep.c
blob: 1123d1ddfd20103bba7b331da5c31c6672a661ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*-
 * Copyright (c) 2008-2013 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(long seconds, long micro_seconds)
{
	struct timeval t;

	t.tv_sec = seconds + micro_seconds / 1000000;
	t.tv_usec = (suseconds_t)(micro_seconds % 1000000);

	(void)select(0, NULL, NULL, NULL, &t);
}