Exemplo n.º 1
0
Timestamp
Timestamp::fromComponents(const Timestamp::Components &c)
{
  Components normal = c;
  normal.normalize();
  return Timestamp((c.hours * millisPerHour)
                 + (c.minutes * millisPerMinute)
                 + (c.seconds * millisPerSecond)
                 + (c.msec));
}
Exemplo n.º 2
0
void
Timestamp::setComponents(const Timestamp::Components &c)
{
  Components normal = c;
  normal.normalize();
  ms = (c.hours * millisPerHour)
     + (c.minutes * millisPerMinute)
     + (c.seconds * millisPerSecond)
     + (c.msec);
}