ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1#pragma once
2
3/* POSIX <sys/time.h>. Without a copy here, a program including it falls
4 * through to the platform SDK, whose header pulls <sys/_types/_fd_def.h> and
5 * <sys/_types/_timeval.h>. Those redefine the fd_set and timeval that
6 * <sys/select.h> already defines, so on macOS such a program did not compile
7 * at all. */
8#include <sys/select.h> /* fd_set, struct timeval, select */
9#include <time.h> /* struct timespec, time_t */
10
12
14{
15 int tz_minuteswest; // cppcheck-suppress unusedStructMember
16 int tz_dsttime; // cppcheck-suppress unusedStructMember
17};
18
19int gettimeofday(struct timeval *tv, struct timezone *tz);
20int settimeofday(const struct timeval *tv, const struct timezone *tz);
21
22#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
23#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
24#define timercmp(a, b, CMP) \
25 (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP(b)->tv_usec) \
26 : ((a)->tv_sec CMP(b)->tv_sec))
27
#define __ESBMC_C_CPP_END
Definition stddefs.h:9
#define __ESBMC_C_CPP_BEGIN
Definition stddefs.h:8
Definition select.h:41
Definition time.h:14
int tz_minuteswest
Definition time.h:15
int tz_dsttime
Definition time.h:16
int settimeofday(const struct timeval *tv, const struct timezone *tz)
int gettimeofday(struct timeval *tv, struct timezone *tz)