mozilla

Revision 66951 of PRTime

  • Revision slug: PRTime
  • Revision title: PRTime
  • Revision id: 66951
  • Created:
  • Creator: mnoorenberghe
  • Is current revision? Yes
  • Comment remove note about LL macros since it's no longer required; 39 words removed

Revision Content

{{ Nsprapiref("Date and Time") }}

A representation of absolute times.

Syntax

 #include <prtime.h>
 
 typedef PRInt64 PRTime;

Description

This type is a 64-bit integer representing the number of microseconds since the NSPR epoch, midnight (00:00:00) 1 January 1970 Coordinated Universal Time (UTC). A time after the epoch has a positive value, and a time before the epoch has a negative value.

In NSPR, we use the more familiar term Greenwich Mean Time (GMT) in place of UTC. Although UTC and GMT are not exactly the same in their precise definitions, they can generally be treated as if they were.

Note: Keep in mind that while PRTime stores times in microseconds since epoch, JavaScript date objects store times in milliseconds since epoch.

{{ languages( { "es": "es/PRTime" } ) }}

Revision Source

<p>{{ Nsprapiref("Date and Time") }}</p>
<p>A representation of absolute times.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval"> #include &lt;prtime.h&gt;
 
 typedef PRInt64 PRTime;
</pre>
<h3 id="Description" name="Description">Description</h3>
<p>This type is a 64-bit integer representing the number of microseconds since the NSPR epoch, midnight (00:00:00) 1 January 1970 Coordinated Universal Time (UTC). A time after the epoch has a positive value, and a time before the epoch has a negative value.</p>
<p>In NSPR, we use the more familiar term Greenwich Mean Time (GMT) in place of UTC. Although UTC and GMT are not exactly the same in their precise definitions, they can generally be treated as if they were.</p>
<div class="note"><strong>Note:</strong> Keep in mind that while <code>PRTime</code> stores times in microseconds since epoch, JavaScript date objects store times in milliseconds since epoch.</div>

<p>{{ languages( { "es": "es/PRTime" } ) }}</p>
Revert to this revision