1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: Time</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
<tbody>
<tr>
<td id="projectlogo">
<a href="http://www.wxwidgets.org/" target="_new">
<img alt="wxWidgets" src="logo.png"/>
</a>
</td>
<td style="padding-left: 0.5em; text-align: right;">
<span id="projectnumber">Version: 3.0.2</span>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Categories</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Time</div> </div>
<div class="ingroups"><a class="el" href="group__group__funcmacro.html">Functions and Macros by Category</a></div></div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The functions in this section deal with getting the current time and sleeping for the specified time interval. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga595d562b91080c486af44c752a725fea"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga595d562b91080c486af44c752a725fea">wxGetTimeZone</a> ()</td></tr>
<tr class="memdesc:ga595d562b91080c486af44c752a725fea"><td class="mdescLeft"> </td><td class="mdescRight">Returns the difference between UTC and local time in seconds. <a href="#ga595d562b91080c486af44c752a725fea"></a><br/></td></tr>
<tr class="separator:ga595d562b91080c486af44c752a725fea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa47bc61fdb1251cfc6ee234520e1df27"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#gaa47bc61fdb1251cfc6ee234520e1df27">wxGetLocalTime</a> ()</td></tr>
<tr class="memdesc:gaa47bc61fdb1251cfc6ee234520e1df27"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of seconds since local time 00:00:00 Jan 1st 1970. <a href="#gaa47bc61fdb1251cfc6ee234520e1df27"></a><br/></td></tr>
<tr class="separator:gaa47bc61fdb1251cfc6ee234520e1df27"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga163e97c4b3b5eeb0c8de80cd81ae09da"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_long_long.html">wxLongLong</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga163e97c4b3b5eeb0c8de80cd81ae09da">wxGetLocalTimeMillis</a> ()</td></tr>
<tr class="memdesc:ga163e97c4b3b5eeb0c8de80cd81ae09da"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970. <a href="#ga163e97c4b3b5eeb0c8de80cd81ae09da"></a><br/></td></tr>
<tr class="separator:ga163e97c4b3b5eeb0c8de80cd81ae09da"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga673d50c96dd575ba6658fa1b094dc769"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga673d50c96dd575ba6658fa1b094dc769">wxGetUTCTime</a> ()</td></tr>
<tr class="memdesc:ga673d50c96dd575ba6658fa1b094dc769"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of seconds since GMT 00:00:00 Jan 1st 1970. <a href="#ga673d50c96dd575ba6658fa1b094dc769"></a><br/></td></tr>
<tr class="separator:ga673d50c96dd575ba6658fa1b094dc769"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9e6cb143b3e04cf0459aa3f9763eec82"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_long_long.html">wxLongLong</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga9e6cb143b3e04cf0459aa3f9763eec82">wxGetUTCTimeMillis</a> ()</td></tr>
<tr class="memdesc:ga9e6cb143b3e04cf0459aa3f9763eec82"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970. <a href="#ga9e6cb143b3e04cf0459aa3f9763eec82"></a><br/></td></tr>
<tr class="separator:ga9e6cb143b3e04cf0459aa3f9763eec82"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafd807c12555028ba730f4aa56983339c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_long_long.html">wxLongLong</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#gafd807c12555028ba730f4aa56983339c">wxGetUTCTimeUSec</a> ()</td></tr>
<tr class="memdesc:gafd807c12555028ba730f4aa56983339c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970. <a href="#gafd807c12555028ba730f4aa56983339c"></a><br/></td></tr>
<tr class="separator:gafd807c12555028ba730f4aa56983339c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga21baed39430c5dae8517c4bd87fcf357"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga21baed39430c5dae8517c4bd87fcf357">wxMicroSleep</a> (unsigned long microseconds)</td></tr>
<tr class="memdesc:ga21baed39430c5dae8517c4bd87fcf357"><td class="mdescLeft"> </td><td class="mdescRight">Sleeps for the specified number of microseconds. <a href="#ga21baed39430c5dae8517c4bd87fcf357"></a><br/></td></tr>
<tr class="separator:ga21baed39430c5dae8517c4bd87fcf357"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga66778879349f76fd833902d3767006fa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga66778879349f76fd833902d3767006fa">wxMilliSleep</a> (unsigned long milliseconds)</td></tr>
<tr class="memdesc:ga66778879349f76fd833902d3767006fa"><td class="mdescLeft"> </td><td class="mdescRight">Sleeps for the specified number of milliseconds. <a href="#ga66778879349f76fd833902d3767006fa"></a><br/></td></tr>
<tr class="separator:ga66778879349f76fd833902d3767006fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6c406d666359a8c34ef4a35277e5ea83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classwx_string.html">wxString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga6c406d666359a8c34ef4a35277e5ea83">wxNow</a> ()</td></tr>
<tr class="memdesc:ga6c406d666359a8c34ef4a35277e5ea83"><td class="mdescLeft"> </td><td class="mdescRight">Returns a string representing the current date and time. <a href="#ga6c406d666359a8c34ef4a35277e5ea83"></a><br/></td></tr>
<tr class="separator:ga6c406d666359a8c34ef4a35277e5ea83"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga35215dff464a300f45dec961b3c23539"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#ga35215dff464a300f45dec961b3c23539">wxSleep</a> (int secs)</td></tr>
<tr class="memdesc:ga35215dff464a300f45dec961b3c23539"><td class="mdescLeft"> </td><td class="mdescRight">Sleeps for the specified number of seconds. <a href="#ga35215dff464a300f45dec961b3c23539"></a><br/></td></tr>
<tr class="separator:ga35215dff464a300f45dec961b3c23539"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac19b07b94bdf832cca9666b06f7d2882"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__time.html#gac19b07b94bdf832cca9666b06f7d2882">wxUsleep</a> (unsigned long milliseconds)</td></tr>
<tr class="separator:gac19b07b94bdf832cca9666b06f7d2882"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa47bc61fdb1251cfc6ee234520e1df27"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long wxGetLocalTime </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of seconds since local time 00:00:00 Jan 1st 1970. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_date_time.html#a6e6c37a0414bb4831e2cc03b37f498a2" title="Returns the object corresponding to the current time.">wxDateTime::Now()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre>
</div>
</div>
<a class="anchor" id="ga163e97c4b3b5eeb0c8de80cd81ae09da"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_long_long.html">wxLongLong</a> wxGetLocalTimeMillis </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970. </p>
<p>The use of <a class="el" href="group__group__funcmacro__time.html#ga9e6cb143b3e04cf0459aa3f9763eec82" title="Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970.">wxGetUTCTimeMillis()</a> is preferred as it provides a usually (except for changes to the system time) monotonic clock which the local time also changes whenever DST begins or ends.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_date_time.html#a6e6c37a0414bb4831e2cc03b37f498a2" title="Returns the object corresponding to the current time.">wxDateTime::Now()</a>, <a class="el" href="group__group__funcmacro__time.html#ga9e6cb143b3e04cf0459aa3f9763eec82" title="Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970.">wxGetUTCTimeMillis()</a>, <a class="el" href="group__group__funcmacro__time.html#gafd807c12555028ba730f4aa56983339c" title="Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970.">wxGetUTCTimeUSec()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre>
</div>
</div>
<a class="anchor" id="ga595d562b91080c486af44c752a725fea"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wxGetTimeZone </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the difference between UTC and local time in seconds. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre>
</div>
</div>
<a class="anchor" id="ga673d50c96dd575ba6658fa1b094dc769"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long wxGetUTCTime </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of seconds since GMT 00:00:00 Jan 1st 1970. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_date_time.html#a6e6c37a0414bb4831e2cc03b37f498a2" title="Returns the object corresponding to the current time.">wxDateTime::Now()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre>
</div>
</div>
<a class="anchor" id="ga9e6cb143b3e04cf0459aa3f9763eec82"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_long_long.html">wxLongLong</a> wxGetUTCTimeMillis </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre><dl class="section since"><dt>Since</dt><dd>2.9.3 </dd></dl>
</div>
</div>
<a class="anchor" id="gafd807c12555028ba730f4aa56983339c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_long_long.html">wxLongLong</a> wxGetUTCTimeUSec </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/time.h> </pre><dl class="section since"><dt>Since</dt><dd>2.9.3 </dd></dl>
</div>
</div>
<a class="anchor" id="ga21baed39430c5dae8517c4bd87fcf357"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxMicroSleep </td>
<td>(</td>
<td class="paramtype">unsigned long </td>
<td class="paramname"><em>microseconds</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleeps for the specified number of microseconds. </p>
<p>The microsecond resolution may not, in fact, be available on all platforms (currently only Unix platforms with nanosleep(2) may provide it) in which case this is the same as calling <a class="el" href="group__group__funcmacro__time.html#ga66778879349f76fd833902d3767006fa" title="Sleeps for the specified number of milliseconds.">wxMilliSleep()</a> with the argument of <em>microseconds/1000</em>.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/utils.h> </pre>
</div>
</div>
<a class="anchor" id="ga66778879349f76fd833902d3767006fa"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxMilliSleep </td>
<td>(</td>
<td class="paramtype">unsigned long </td>
<td class="paramname"><em>milliseconds</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleeps for the specified number of milliseconds. </p>
<p>Notice that usage of this function is encouraged instead of calling usleep(3) directly because the standard <em>usleep()</em> function is not MT safe.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/utils.h> </pre>
</div>
</div>
<a class="anchor" id="ga6c406d666359a8c34ef4a35277e5ea83"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classwx_string.html">wxString</a> wxNow </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a string representing the current date and time. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/utils.h> </pre>
</div>
</div>
<a class="anchor" id="ga35215dff464a300f45dec961b3c23539"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxSleep </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>secs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sleeps for the specified number of seconds. </p>
<p>Include file: </p>
<pre class="fragment">#include <wx/utils.h> </pre>
</div>
</div>
<a class="anchor" id="gac19b07b94bdf832cca9666b06f7d2882"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void wxUsleep </td>
<td>(</td>
<td class="paramtype">unsigned long </td>
<td class="paramname"><em>milliseconds</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000065">Deprecated:</a></b></dt><dd>This function is deprecated because its name is misleading: notice that the argument is in milliseconds, not microseconds. Please use either <a class="el" href="group__group__funcmacro__time.html#ga66778879349f76fd833902d3767006fa" title="Sleeps for the specified number of milliseconds.">wxMilliSleep()</a> or <a class="el" href="group__group__funcmacro__time.html#ga21baed39430c5dae8517c4bd87fcf357" title="Sleeps for the specified number of microseconds.">wxMicroSleep()</a> depending on the resolution you need.</dd></dl>
<p>Sleeps for the specified number of milliseconds.</p>
<p>Include file: </p>
<pre class="fragment">#include <wx/utils.h> </pre>
</div>
</div>
</div><!-- contents -->
<address class="footer">
<small>
Generated on Thu Nov 27 2014 13:46:43 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>
|