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)); }
void Timestamp::setComponents(const Timestamp::Components &c) { Components normal = c; normal.normalize(); ms = (c.hours * millisPerHour) + (c.minutes * millisPerMinute) + (c.seconds * millisPerSecond) + (c.msec); }