Closed Bug 1159578 Opened 9 years ago Closed 9 years ago

Have TimeUnit object

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 1138260 introduced the strongly typed media::Microseconds object. The main aim of this type was to avoid common bugs comparing seconds with microseconds and incorrectly use them interchangeably.

We should have a TimeUnit object which doesn't represent a particular time unit, but instead would be used to convert to microseconds or seconds or what else.

The internal implementation of a TimeUnit would likely use microseconds.
Assignee: nobody → jyavenard
Attached patch Add a TimeUnit object (obsolete) — Splinter Review
Add TimeUnit object, a strongly typed unit of time
Attachment #8599640 - Flags: review?(matt.woodrow)
Comment on attachment 8599640 [details] [diff] [review]
Add a TimeUnit object

will change so it can detect overflow
Attachment #8599640 - Attachment is obsolete: true
Attachment #8599640 - Flags: review?(matt.woodrow)
Use CheckedInt64 instead
Attachment #8600142 - Flags: review?(matt.woodrow)
Attachment #8600142 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/6f56bbf8cb5c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.