zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1
2// Licensed Materials - Property of IBM
3// ZOSLIB
4// (C) Copyright IBM Corp. 2021. All Rights Reserved.
5// US Government Users Restricted Rights - Use, duplication
6// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8
9#ifndef ZOS_TIME_H_
10#define ZOS_TIME_H_
11
12#define __XPLAT 1
13#include "zos-macros.h"
14
15#if (__EDC_TARGET < 0x42050000) && defined(ZOSLIB_ENABLE_V2R5_FEATURES)
16#include_next <time.h>
17
18#if defined(__cplusplus)
19extern "C" {
20#endif
21
22typedef enum {
27} clockid_t;
28
35__Z_EXPORT extern int (*clock_gettime)(clockid_t cld_id, struct timespec * tp);
36__Z_EXPORT extern int (*nanosleep)(const struct timespec*, struct timespec*);
37#if defined(__cplusplus)
38}
39#endif
40
41#else
42
43#include_next <time.h>
44
51
52#if defined(__cplusplus)
53extern "C" {
54#endif
55__Z_EXPORT int clock_gettime(clockid_t cld_id, struct timespec * tp);
56#if defined(__cplusplus)
57}
58#endif
59
67#if defined(__cplusplus)
68extern "C" {
69#endif
70__Z_EXPORT int __nanosleep(const struct timespec*, struct timespec*);
71#ifndef nanosleep
72__Z_EXPORT int nanosleep(const struct timespec*, struct timespec*) __asm("__nanosleep");
73#endif
74#if defined(__cplusplus)
75}
76#endif
77
78#endif
79#endif
__Z_EXPORT int nanosleep(const struct timespec *, struct timespec *) __asm("__nanosleep")
clockid_t
(__EDC_TARGET < 0x42050000) && defined(ZOSLIB_ENABLE_V2R5_FEATURES)
Definition time.h:45
@ CLOCK_MONOTONIC
Definition time.h:47
@ CLOCK_REALTIME
Definition time.h:46
@ CLOCK_THREAD_CPUTIME_ID
Definition time.h:49
@ CLOCK_HIGHRES
Definition time.h:48
__Z_EXPORT int __nanosleep(const struct timespec *, struct timespec *)
Definition zos.cc:2902
__Z_EXPORT int clock_gettime(clockid_t cld_id, struct timespec *tp)
Definition zos.cc:1714
#define __Z_EXPORT
Definition zos-macros.h:13