1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>OSTicksToCalendarTime</title> 10</head> 11 12<body> 13 14<h1>OSTicksToCalendarTime</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/os.h> 19 20typedef struct OSCalendarTime 21{ 22 int sec; // seconds after the minute [0, 61] 23 int min; // minutes after the hour [0, 59] 24 int hour; // hours since midnight [0, 23] 25 int mday; // day of the month [1, 31] 26 int mon; // month since January [0, 11] 27 int year; // year [1, ...] 28 int wday; // days since Sunday [0, 6] 29 int yday; // days since January 1 [0, 365] 30 31 int msec; // milliseconds after the second [0,999] 32 int usec; // microseconds after the millisecond [0,999] 33} OSCalendarTime; 34 35void OSTicksToCalendarTime(OSTime ticks, OSCalendarTime* td); 36</pre></dd></dl> 37 38<h2>Arguments</h2> 39<TABLE class="arguments" border="1" > 40 <tr> 41<TH>ticks</TH> 42<TD>An <CODE>OSTime</CODE> (64-bit) type integer value.</TD> 43 </tr> 44 <tr> 45<TH>td</TH> 46<TD>Pointer to an <CODE>OSCalendarTime</CODE> type, which obtains the calendar time.</TD> 47 </tr> 48</TABLE> 49 50<h2>Return Values</h2> 51<P>None.</P> 52 53<H2>Description</H2> 54<P>Converts the time representation from ticks (in <CODE>OS_TIMER_CLOCK</CODE> Hz) to calendar time.</P> 55 56<P>To get the current date and time, call the <code>OSTicksToCalendarTime</code> function as follows.</P> 57 58<dl><dd><pre class="construction"> 59OSCalendarTime td; 60 61OSTicksToCalendarTime(<a href="OSGetTime.html">OSGetTime()</a>, &td); 62</pre></dd></dl> 63 64<h2>See Also</h2> 65<P class="reference"> 66<a href="../toc.html#Time" target="contents">Time Functions</a>, 67<a href="OSTicksToCycles.html">OSTicksToCycles</a>, 68<a href="OSTicksToSeconds.html">OSTicksToSeconds</a>, 69<a href="OSTicksToMilliseconds.html">OSTicksToMilliseconds</a>, 70<a href="OSSecondsToTicks.html">OSSecondsToTicks</a>, 71<a href="OSMillisecondsToTicks.html">OSMillisecondsToTicks</a>, 72<a href="OSMicrosecondsToTicks.html">OSMicrosecondsToTicks</a>, 73<a href="OSNanosecondsToTicks.html">OSNanosecondsToTicks</a>, 74<a href="OSCalendarTimeToTicks.html">OSCalendarTimeToTicks</a> 75</p> 76 77<H2>Revision History</H2> 78<P> 792006/03/01 Initial version.<br> 80</P> 81 82<hr><p>CONFIDENTIAL</p></body> 83</html>