Open Bug 1371585 Opened 7 years ago Updated 2 years ago

How to convert Epoch relative timestamps in a TimeStamp instance

Categories

(Core :: mozglue, enhancement, P5)

enhancement

Tracking

()

People

(Reporter: nbp, Unassigned)

Details

Some IDL are providing timestamps in a time relative to Epoch:
  http://searchfox.org/mozilla-central/search?q=epoch&case=false&regexp=false&path=idl

TimeStamp are made out of monotone clock, which does not provide any guarantee over having a type able to represent Epoch if I understand correctly.

Thus I think it would be nice if we could add the following static function:

  TimeStamp TimeStamp::SinceEpoch(TimeDuration aTimeSinceEpoch)

to create a TimeStamp based on the imported duration reported in the previous IDL files.

On a related topic, the monotone clocks have no guarantee to be identical between the parent and the children processes.  Having a way to export to a common base TimeStamp such as Epoch would solve some issues.
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.