diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-07-11 23:39:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-07-11 23:39:33 +0000 |
commit | d357fd30cd6855f40dedf8050ee45067d0ee281f (patch) | |
tree | 7a162ac7ade2d63f3df2efddaf778ec795c7865a /nuttx/Documentation/NuttxUserGuide.html | |
parent | fb117bfced091fd2ee5a32f2ab39b6d7a48e0676 (diff) | |
download | px4-nuttx-d357fd30cd6855f40dedf8050ee45067d0ee281f.tar.gz px4-nuttx-d357fd30cd6855f40dedf8050ee45067d0ee281f.tar.bz2 px4-nuttx-d357fd30cd6855f40dedf8050ee45067d0ee281f.zip |
Add gettimeofday()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1974 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Documentation/NuttxUserGuide.html')
-rw-r--r-- | nuttx/Documentation/NuttxUserGuide.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nuttx/Documentation/NuttxUserGuide.html b/nuttx/Documentation/NuttxUserGuide.html index 05fa44f14..7c6bb0f0a 100644 --- a/nuttx/Documentation/NuttxUserGuide.html +++ b/nuttx/Documentation/NuttxUserGuide.html @@ -2469,6 +2469,7 @@ VxWorks provides the following comparable interface: <li><a href="#timersettime">2.7.9 timer_settime</a></li> <li><a href="#timergettime">2.7.10 timer_gettime</a></li> <li><a href="#timergetoverrun">2.7.11 timer_getoverrun</a></li> + <li><a href="#gettimeofday">2.7.12 gettimeofday</a></li> </ul> <H3><a name="clocksettime">2.7.1 clock_settime</a></H3> @@ -2917,6 +2918,33 @@ VxWorks provides the following comparable interface: interface of the same name. </p> +<h3><a name="gettimeofday">2.7.12 gettimeofday</a></h3> +<p> + <b>Function Prototype:</b> +</p> +<pre> + #include <sys/time.h> + int gettimeofday(struct timeval *tp, void *tzp); +</pre> +<p> + <b>Description:</b> + This implementation of <code>gettimeofday()</code> is simply a thin wrapper around + <a href="#clockgettime"><code>clock_gettime()</code></a>. + It simply calls <code>clock_gettime()</code> using the <code>CLOCK_REALTIME</code> timer and + converts the result to the required <code>struct timeval</code>. +</p> +<p> + <b>Input Parameters:</b> +</p> +<ul> + <li><code>tp</code>. The current time will be returned to this user provided location.</li> + <li><code>tzp</code>. A reference to the timezone -- <i>IGNORED</i>.</li> +</ul> +<p> + <b>Returned Values:</b> + See <a href="#clockgettime"><code>clock_gettime()</code></a>. +</p> + <table width ="100%"> <tr bgcolor="#e4e4e4"> <td> |