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=utf-8"> 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>OSSetAlarm</title> 10</head> 11 12<body> 13 14<h1>OSSetAlarm</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/os.h> 19 20typedef void (* OSAlarmHandler ) (OSAlarm* alarm, OSContext* context); 21 22void OSSetAlarm (OSAlarm* alarm, 23 OSTime tick, 24 OSAlarmHandler handler); 25</pre></dd></dl> 26 27<h2>Arguments</h2> 28<TABLE class="arguments" border="1" > 29 <tr> 30<TH><STRONG><EM><CODE>alarm</CODE></EM></STRONG></TH> 31<TD>Pointer to alarm to set.</TD> 32 </tr> 33 <tr> 34<TH><STRONG><EM><CODE>tick</CODE></EM></STRONG></TH> 35<TD>Tick count before firing.</TD> 36 </tr> 37 <tr> 38<TH><STRONG><EM><CODE>handler</CODE></EM></STRONG></TH> 39<TD>Alarm handler to call.</TD> 40 </tr> 41</TABLE> 42 43<h2>Return Values</h2> 44<p>None.</p> 45 46<H2>Description</H2> 47<P>Sets a one-time alarm.</P> 48 49<P> 50<B>Note: </B> If you are going to reset an active alarm that was set by the <CODE>OSSetPeriodicAlarm</CODE> function, call the <CODE><a href="OSCancelAlarm.html">OSCancelAlarm</a></CODE> function and delete that alarm before setting it again. Operations are not guaranteed if you reset an alarm without first deleting it. 51 52</P> 53<h2>See Also</h2> 54<P class="reference"> 55<a target="contents" href="../toc.html#Alarm">Alarm Functions</a><BR> <a href="OSCancelAlarm.html">OSCancelAlarm</a><BR> <a href="OSCreateAlarm.html">OSCreateAlarm</a><BR><a href="OSSetPeriodicAlarm.html">OSSetPeriodicAlarm</a> 56</p> 57 58<H2>Revision History</H2> 59<P> 602009/09/24 Added a note about resetting alarms.<br>2006/03/01 Initial version.<br> 61</P> 62 63<hr><p>CONFIDENTIAL</p></body> 64</html>