Sleep

Overview

Functions for different delays. More…

// global functions

static void te_sleep(unsigned int to_sleep);
static void te_motivated_usleep(unsigned int to_sleep, const char* why);
static void te_motivated_msleep(unsigned int to_sleep, const char* why);
static void te_motivated_sleep(unsigned int to_sleep, const char* why);
static void te_msleep(unsigned int to_sleep);
static void te_usleep(unsigned int to_sleep);

// macros

#define TIMEVAL_SUB(_tv1, _tv2)

Detailed Documentation

Functions for different delays.

Copyright (C) 2004-2022 OKTET Labs Ltd. All rights reserved.

Global Functions

static void te_sleep(unsigned int to_sleep)

Sleep specified number of seconds.

Parameters:

to_sleep

number of seconds to sleep

static void te_motivated_usleep(unsigned int to_sleep, const char* why)

Sleep specified number of microseconds.

Parameters:

to_sleep

Number of microseconds to sleep

why

String that describes reason to sleep here.

static void te_motivated_msleep(unsigned int to_sleep, const char* why)

Sleep specified number of milliseconds.

Parameters:

to_sleep

Number of milliseconds to sleep

why

String that describes reason to sleep here.

static void te_motivated_sleep(unsigned int to_sleep, const char* why)

Sleep specified number of seconds.

Parameters:

to_sleep

Number of seconds to sleep

why

String that describes reason to sleep here.

static void te_msleep(unsigned int to_sleep)

Sleep specified number of milliseconds.

Parameters:

to_sleep

number of milliseconds to sleep

static void te_usleep(unsigned int to_sleep)

Sleep specified number of microseconds.

Parameters:

to_sleep

number of milliseconds to sleep

Macros

#define TIMEVAL_SUB(_tv1, _tv2)

Substract tv1 to tv2 of type struct timeval.

Parameters:

_tv1

_tv2

Returns:

Diff in microseconds