Return the time & date as an epoch Arguments: None
| Return Type | Function name | Arguments |
|---|---|---|
| uint32_t | hzXDate::AsEpoch | (void) |
Declared in file: hzDate.h
Defined in file : hzDate.cpp
Function Logic:
Function body:
uint32_t hzXDate::AsEpoch (void)
{
// Return the time & date as an epoch
//
// Arguments: None
// Returns: Number of seconds passed since epoch start
uint32_t epoch ; // Target epoch
if (m_hour < HOURS_B4_EPOCH || m_hour > HOURS_EPOCH_END)
return 0;
epoch = m_hour - HOURS_B4_EPOCH ;
epoch *= SECS_IN_HOUR ;
epoch += (m_usec/1000000);
return epoch ;
}