EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
generalTimeSup.h
1 /*************************************************************************\
2 * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2008 Diamond Light Source Ltd
5 * Copyright (c) 2004 Oak Ridge National Laboratory
6 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 
11 #ifndef INC_generalTimeSup_H
12 #define INC_generalTimeSup_H
13 
14 #include "epicsTime.h"
15 #include "epicsTimer.h"
16 #include "libComAPI.h"
17 
18 #define LAST_RESORT_PRIORITY 999
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef int (*TIMECURRENTFUN)(epicsTimeStamp *pDest);
25 typedef int (*TIMEEVENTFUN)(epicsTimeStamp *pDest, int event);
26 
27 LIBCOM_API int generalTimeRegisterCurrentProvider(const char *name,
28  int priority, TIMECURRENTFUN getTime);
29 LIBCOM_API int generalTimeRegisterEventProvider(const char *name,
30  int priority, TIMEEVENTFUN getEvent);
31 
32 /* Original names, for compatibility */
33 #define generalTimeCurrentTpRegister generalTimeRegisterCurrentProvider
34 #define generalTimeEventTpRegister generalTimeRegisterEventProvider
35 
36 LIBCOM_API int generalTimeAddIntCurrentProvider(const char *name,
37  int priority, TIMECURRENTFUN getTime);
38 LIBCOM_API int generalTimeAddIntEventProvider(const char *name,
39  int priority, TIMEEVENTFUN getEvent);
40 
41 LIBCOM_API int generalTimeGetExceptPriority(epicsTimeStamp *pDest,
42  int *pPrio, int ignorePrio);
43 
44 #ifdef __cplusplus
45 }
46 #endif
47 
48 #endif /* INC_generalTimeSup_H */
EPICS time stamp, for use from C code.
Definition: epicsTime.h:42
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...