72 lines
2.9 KiB
HTML
72 lines
2.9 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Time APIs</title>
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<!-- Begin Header Records ========================================= -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!-- File Edited December 2001 -->
|
||
|
<!-- 0300507 JETAYLOR split apart into two sets -->
|
||
|
<!-- End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Time APIs</h2>
|
||
|
|
||
|
<p>The Time APIs include two
|
||
|
sets of APIs:</p>
|
||
|
|
||
|
<ul>
|
||
|
|
||
|
<li><a href="unix10a.htm">System Clock APIs</a></li>
|
||
|
|
||
|
<li><a href="unix10b.htm">Software Clock APIs</a></li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p>Both the System Clock and Software Clock APIs use a timeval structure that
|
||
|
is the number of seconds and microseconds since 1 January 1970, 00:00:00
|
||
|
Universal Coordinated Time (UTC).</p>
|
||
|
|
||
|
<p>The System Clock APIs allow you to work with the system clock. The system
|
||
|
clock is a system facility that maintains the time of the system. The <strong>
|
||
|
gettimeofday()</strong> and <strong>ftime()</strong> APIs get the current time
|
||
|
from the system clock. The <strong>adjtime()</strong> and <strong>
|
||
|
settimeofday()</strong> APIs set the system clock. See the <a href=
|
||
|
"../rzati/rzatikickoff.htm">Time Management</a> topic for more information
|
||
|
about the system clock.</p>
|
||
|
|
||
|
<p>The Software Clock APIs allow you to work with the software clock. The
|
||
|
software clock is a system facility that maintains a time that is independent
|
||
|
from the system clock. The <strong>Qp0zGetTimeofDay()</strong> API gets the
|
||
|
current time from the software clock. The <strong>Qp0zAdjTime()</strong> and
|
||
|
<strong>Qp0zSetTimeofDay()</strong> APIs set the software clock. In previous
|
||
|
releases, the software clock was the only way to get a UTC time in seconds and
|
||
|
microseconds. System components do not base their timestamps on the
|
||
|
software clock, but use the system clock instead. The software clock will be
|
||
|
removed in a future release and its use is discouraged.</p>
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center">
|
||
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
||
|
"unix.htm">UNIX-Type APIs</a> | <a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|