Use new general time registration.

Allow use in both statically- and dynamically-loaded environment.
This commit is contained in:
W. Eric Norum
2008-05-09 15:39:55 +00:00
parent 3cca2c745b
commit edb08afdc3

View File

@@ -78,3 +78,16 @@ int epicsTime_localtime ( const time_t *clock, struct tm *result )
return epicsTimeERROR;
}
}
/*
* Register local time providers if EPICS is running (i.e. if this
* code has been dynamically loaded into a running system).
*/
class osdTimeReg {
public:
osdTimeReg() {
extern rtems_interval rtemsTicksPerSecond;
if (rtemsTicksPerSecond != 0) osdTimeRegister();
}
};
static osdTimeReg osdTimeRegObj;