PRTime

  • Revision slug: PRTime
  • Revision title: PRTime
  • Revision id: 66950
  • Created:
  • Creator: Mgjbot
  • Is current revision? No
  • Comment robot Adding: [[es:PRTime]] <<langbot>>

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.

Because PRTime is a 64-bit integer, you must use the LL macros defined in <tt>prlong.h</tt> to manipulate PRTime values. (See Chapter 18 "Long Long (64-bit) Integers)".

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 name="Syntax">Syntax</h3>
<pre class="eval"> #include &lt;prtime.h&gt;
 
 typedef PRInt64 PRTime;
</pre>
<h3 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><p>Because <code>PRTime</code> is a 64-bit integer, you must use the LL macros defined in <tt>prlong.h</tt> to manipulate <code>PRTime</code> values. (See <a href="en/NSPR_API_Reference/Long_Long_(64-bit)_Integers">Chapter 18 "Long Long (64-bit) Integers</a>)".
</p>
<div class="note"><b>Note:</b> Keep in mind that while <code>PRTime</code> stores times in microseconds since epoch, JavaScript date objects store times in milliseconds since epoch.</div>
<div class="noinclude">
</div>
{{ languages( { "es": "es/PRTime" } ) }}
Revert to this revision