Advance or retard a hzXDate by a number of seconds. This will alter the day date if the alteration is sufficient to cross one or more midnight boundaries. Returns: None
| Return Type | Function name | Arguments |
|---|---|---|
| void | hzXDate::altsec | (int32_t,) |
Declared in file: hzDate.h
Defined in file : hzDate.cpp
Function Logic:
Function body:
void hzXDate::altsec (int32_t units)
{
// Advance or retard a hzXDate by a number of seconds. This will alter the day date if the alteration is sufficient to cross one or more
// midnight boundaries.
//
// Arguments: 1) nounits Number of units (seconds) into future/past
//
// Returns: None
int64_t S ; // No of full seconds
int64_t X ; // No of micro-seconds
m_hour += (units/3600);
units %= 3600;
S = m_usec ;
X = units ;
X *= 1000000;
S += X ;
if (S > 3600000000)
{ S -= 3600000000;m_hour++;}
m_usec = (uint32_t) S ;
}