1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_GetTick</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_GetTick <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/os.h&gt;</CODE></PRE>
16  <PRE><CODE>OSTick OS_GetTick( void );
17  </CODE></PRE>
18</DL>
19<H2>Arguments</H2>
20<P>None.</P>
21<H2>Return Values</H2>
22<P>The tick value.</P>
23<H2>Description</H2>
24<P>Acquires a tick value. <CODE>OSTick</CODE> tick values are of type <CODE>u64</CODE>.</P>
25<P>Ticks must be initialized with the <CODE><A href="OS_InitTick.html">OS_InitTick</A></CODE> function before calling this function.</P>
26<P>Internally, this function creates a tick value from the 16-bit timer counter value and the timer's interrupt count counter. <FONT color="#ff0000">Accordingly, if interrupts are disabled for a long period (at least 65536 * <CODE>OS_SYSTEM_CLOCK</CODE>/64 Hz, or approximately 7.5 frames) the counter will fail to advance, and the difference between the tick values before and after that period will be inconsistent.</FONT></P>
27<H2>See Also</H2>
28<P><CODE><A href="OS_InitTick.html">OS_InitTick</A>, <A href="OS_SetTick.html">OS_SetTick</A>, <A href="OS_GetTickLo.html">OS_GetTickLo</A></CODE></P>
29<H2>Revision History</H2>
30<P>
312005/04/18 Added warning about disabling interrupts for long periods.<br>2004/02/25 Changed systemClock -&gt; tick.<br>2004/02/23 Changed the system clock value to a full 64-bit.<br>2004/02/04 Initial version. </P>
32<hr><p>CONFIDENTIAL</p></body>
33</HTML>