http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/facfa9ba/latest/os/core_os/cputime/os_cputime_ticks_to_nsecs/index.html ---------------------------------------------------------------------- diff --git a/latest/os/core_os/cputime/os_cputime_ticks_to_nsecs/index.html b/latest/os/core_os/cputime/os_cputime_ticks_to_nsecs/index.html new file mode 100644 index 0000000..ee3e9fa --- /dev/null +++ b/latest/os/core_os/cputime/os_cputime_ticks_to_nsecs/index.html @@ -0,0 +1,894 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/cputime/os_cputime_ticks_to_nsecs/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_cputime_ticks_to_nsecs - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="os_cputime_ticks_to_nsecs"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../os_cputime/">CPU Time</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_cputime_delay_nsecs/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_cputime_delay_nsecs/">os_cputime_delay_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_ticks/">os_cputime_delay_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_usecs/">os_cputime_delay_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_get32/">os_cputime_get32</a> + </li> + + + + + + <li > + <a href="../os_cputime_init/">os_cputime_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_nsecs_to_ticks/">os_cputime_nsecs_to_ticks</a> + </li> + + + + + + <li class="active"> + <a href="./">os_cputime_ticks_to_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_usecs/">os_cputime_ticks_to_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_init/">os_cputime_timer_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_relative/">os_cputime_timer_relative</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_start/">os_cputime_timer_start</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_stop/">os_cputime_timer_stop</a> + </li> + + + + + + <li > + <a href="../os_cputime_usecs_to_ticks/">os_cputime_usecs_to_ticks</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../time/os_time/">OS Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/latest/os/introduction">Docs</a></li> + + + + <li>» <a href="../os_cputime/">CPU Time</a></li> + + + + <li>» <a href="../os_cputime_delay_nsecs/">Functions</a></li> + + + + <li>» os_cputime_ticks_to_nsecs</li> + + + + </ul> +</div> + </div> + + <h2 id="os_cputime_ticks_to_nsecs"><font color="F2853F" style="font-size:24pt">os_cputime_ticks_to_nsecs</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">uint32_t</span> <span style="color: #000000">os_cputime_ticks_to_nsecs</span>(<span style="color: #A90D91">uint32_t</span> <span style="color: #000000">ticks</span>) +</pre></div> + + +<p>Converts cputime ticks to nanoseconds.</p> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>ticks</code></td> +<td>Number of cputime ticks to convert to nanoseconds.</td> +</tr> +</tbody> +</table> +<h4 id="returned-values">Returned values</h4> +<p>The number of nanoseconds in <code>ticks</code> number of ticks.</p> +<h4 id="notes">Notes</h4> +<h4 id="example">Example</h4> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">uint32_t</span> <span style="color: #000000">num_nsecs</span>; +<span style="color: #000000">num_nsecs</span> <span style="color: #000000">=</span> <span style="color: #000000">os_cputime_ticks_to_nsecs</span>(<span style="color: #1C01CE">1000000</span>); +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_cputime_nsecs_to_ticks/> + <span class="fa fa-arrow-left"></span> + Previous: os_cputime_nsecs_to_ticks + </a> + + </li> + <li class="pull-right"> + + <a href=../os_cputime_ticks_to_usecs/> + Next: os_cputime_ticks_to_usecs + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/facfa9ba/latest/os/core_os/cputime/os_cputime_ticks_to_usecs/index.html ---------------------------------------------------------------------- diff --git a/latest/os/core_os/cputime/os_cputime_ticks_to_usecs/index.html b/latest/os/core_os/cputime/os_cputime_ticks_to_usecs/index.html new file mode 100644 index 0000000..97a094a --- /dev/null +++ b/latest/os/core_os/cputime/os_cputime_ticks_to_usecs/index.html @@ -0,0 +1,894 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/cputime/os_cputime_ticks_to_usecs/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_cputime_ticks_to_usecs - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="os_cputime_ticks_to_usecs"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../os_cputime/">CPU Time</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_cputime_delay_nsecs/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_cputime_delay_nsecs/">os_cputime_delay_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_ticks/">os_cputime_delay_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_usecs/">os_cputime_delay_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_get32/">os_cputime_get32</a> + </li> + + + + + + <li > + <a href="../os_cputime_init/">os_cputime_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_nsecs_to_ticks/">os_cputime_nsecs_to_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_nsecs/">os_cputime_ticks_to_nsecs</a> + </li> + + + + + + <li class="active"> + <a href="./">os_cputime_ticks_to_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_init/">os_cputime_timer_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_relative/">os_cputime_timer_relative</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_start/">os_cputime_timer_start</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_stop/">os_cputime_timer_stop</a> + </li> + + + + + + <li > + <a href="../os_cputime_usecs_to_ticks/">os_cputime_usecs_to_ticks</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../time/os_time/">OS Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/latest/os/introduction">Docs</a></li> + + + + <li>» <a href="../os_cputime/">CPU Time</a></li> + + + + <li>» <a href="../os_cputime_delay_nsecs/">Functions</a></li> + + + + <li>» os_cputime_ticks_to_usecs</li> + + + + </ul> +</div> + </div> + + <h2 id="os_cputime_ticks_to_usecs"><font color="F2853F" style="font-size:24pt">os_cputime_ticks_to_usecs</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">uint32_t</span> <span style="color: #000000">os_cputime_ticks_to_usecs</span>(<span style="color: #A90D91">uint32_t</span> <span style="color: #000000">ticks</span>) +</pre></div> + + +<p>Converts a specified number of cputime ticks to microseconds.</p> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>ticks</code></td> +<td>Number of cputime ticks to convert to microseconds.</td> +</tr> +</tbody> +</table> +<h4 id="returned-values">Returned values</h4> +<p>The number of microseconds in <code>ticks</code> number of ticks.</p> +<h4 id="notes">Notes</h4> +<h4 id="example">Example</h4> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">uint32_t</span> <span style="color: #000000">num_usecs</span>; +<span style="color: #000000">num_usecs</span> <span style="color: #000000">=</span> <span style="color: #000000">os_cputime_ticks_to_usecs</span>(<span style="color: #1C01CE">1000000</span>); +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_cputime_ticks_to_nsecs/> + <span class="fa fa-arrow-left"></span> + Previous: os_cputime_ticks_to_nsecs + </a> + + </li> + <li class="pull-right"> + + <a href=../os_cputime_timer_init/> + Next: os_cputime_timer_init + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/facfa9ba/latest/os/core_os/cputime/os_cputime_timer_init/index.html ---------------------------------------------------------------------- diff --git a/latest/os/core_os/cputime/os_cputime_timer_init/index.html b/latest/os/core_os/cputime/os_cputime_timer_init/index.html new file mode 100644 index 0000000..be11832 --- /dev/null +++ b/latest/os/core_os/cputime/os_cputime_timer_init/index.html @@ -0,0 +1,938 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/cputime/os_cputime_timer_init/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_cputime_timer_init - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="os_cputime_timer_init"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../os_cputime/">CPU Time</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_cputime_delay_nsecs/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_cputime_delay_nsecs/">os_cputime_delay_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_ticks/">os_cputime_delay_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_usecs/">os_cputime_delay_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_get32/">os_cputime_get32</a> + </li> + + + + + + <li > + <a href="../os_cputime_init/">os_cputime_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_nsecs_to_ticks/">os_cputime_nsecs_to_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_nsecs/">os_cputime_ticks_to_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_usecs/">os_cputime_ticks_to_usecs</a> + </li> + + + + + + <li class="active"> + <a href="./">os_cputime_timer_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_relative/">os_cputime_timer_relative</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_start/">os_cputime_timer_start</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_stop/">os_cputime_timer_stop</a> + </li> + + + + + + <li > + <a href="../os_cputime_usecs_to_ticks/">os_cputime_usecs_to_ticks</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../time/os_time/">OS Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/latest/os/introduction">Docs</a></li> + + + + <li>» <a href="../os_cputime/">CPU Time</a></li> + + + + <li>» <a href="../os_cputime_delay_nsecs/">Functions</a></li> + + + + <li>» os_cputime_timer_init</li> + + + + </ul> +</div> + </div> + + <h2 id="os_cputime_timer_init"><font color="F2853F" style="font-size:24pt">os_cputime_timer_init</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">void</span> <span style="color: #000000">os_cputime_timer_init</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">hal_timer</span> <span style="color: #000000">*timer</span>, <span style="color: #000000">hal_timer_cb</span> <span style="color: #000000">fp</span>, <span style="color: #A90D91">void</span> <span style="color: #000000">*arg</span>) +</pre></div> + + +<p>Initializes a cputime timer, indicated by <code>timer</code>, with a pointer to a callback function to call when the timer expires. When an optional opaque argument is specified, it is passed to the timer callback function. </p> +<p>The callback function has the following prototype:</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">void</span> <span style="color: #000000">hal_timer_cb</span>(<span style="color: #A90D91">void</span> <span style="color: #000000">*arg</span>) +</pre></div> + + +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>timer</code></td> +<td>Pointer to the hal_timer to initialize. This value cannot be NULL.</td> +</tr> +<tr> +<td><code>fp</code></td> +<td>Pointer to the callback function to call when the timer expires. This value cannot be NULL.</td> +</tr> +<tr> +<td><code>arg</code></td> +<td>Optional opaque argument to pass to the hal timer callback function.</td> +</tr> +</tbody> +</table> +<h4 id="returned-values">Returned values</h4> +<p>N/A</p> +<h4 id="notes">Notes</h4> +<h4 id="example">Example</h4> +<p>Example of ble_ll setting up a response timer:</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #000000">ble_ll_wfr_timer_exp</span>(<span style="color: #A90D91">void</span> <span style="color: #000000">*arg</span>) +{ + <span style="color: #A90D91">int</span> <span style="color: #000000">rx_start</span>; + <span style="color: #A90D91">uint8_t</span> <span style="color: #000000">lls</span>; + + ... + + <span style="color: #177500">/* If we have started a reception, there is nothing to do here */</span> + <span style="color: #A90D91">if</span> (<span style="color: #000000">!rx_start</span>) { + <span style="color: #A90D91">switch</span> (<span style="color: #000000">lls</span>) { + <span style="color: #A90D91">case</span> <span style="color: #000000">BLE_LL_STATE_ADV</span>: + <span style="color: #000000">ble_ll_adv_wfr_timer_exp</span>(); + <span style="color: #A90D91">break</span>; + + ... + + <span style="color: #177500">/* Do nothing here. Fall through intentional */</span> + <span style="color: #A90D91">case</span> <span style="color: #000000">BLE_LL_STATE_INITIATING</span>: + <span style="color: #A90D91">default</span><span style="color: #000000">:</span> + <span style="color: #A90D91">break</span>; + } + } +} + +<span style="color: #A90D91">void</span> <span style="color: #000000">ble_ll_init</span>(<span style="color: #A90D91">void</span>) +{ + ... + + <span style="color: #000000">os_cputime_timer_init</span>(<span style="color: #000000">&g_ble_ll_data</span>.<span style="color: #000000">ll_wfr_timer</span>, <span style="color: #000000">ble_ll_wfr_timer_exp</span>, <span style="color: #A90D91">NULL</span>); + + ... +} +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_cputime_ticks_to_usecs/> + <span class="fa fa-arrow-left"></span> + Previous: os_cputime_ticks_to_usecs + </a> + + </li> + <li class="pull-right"> + + <a href=../os_cputime_timer_relative/> + Next: os_cputime_timer_relative + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/facfa9ba/latest/os/core_os/cputime/os_cputime_timer_relative/index.html ---------------------------------------------------------------------- diff --git a/latest/os/core_os/cputime/os_cputime_timer_relative/index.html b/latest/os/core_os/cputime/os_cputime_timer_relative/index.html new file mode 100644 index 0000000..68a60d6 --- /dev/null +++ b/latest/os/core_os/cputime/os_cputime_timer_relative/index.html @@ -0,0 +1,902 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/core_os/cputime/os_cputime_timer_relative/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>os_cputime_timer_relative - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="os_cputime_timer_relative"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0</a> released (March 22, 2017) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../../tutorials/tutorials/">Tutorials</a> + + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + <ul> + + + + + + + + <li ><a href="../../mynewt_os/">OS Core</a> + + + <ul> + + + + + + + + <li><a href=" + ../../os_started/ +">Functions</a> + + + </li> + + + + + + + + <li ><a href="../../context_switch/context_switch/">Scheduler</a> + + + </li> + + + + + + + + <li ><a href="../os_cputime/">CPU Time</a> + + + <ul> + + + + + + + + <li><a href=" + ../os_cputime_delay_nsecs/ +">Functions</a> + + + <ul> + + + + <li > + <a href="../os_cputime_delay_nsecs/">os_cputime_delay_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_ticks/">os_cputime_delay_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_delay_usecs/">os_cputime_delay_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_get32/">os_cputime_get32</a> + </li> + + + + + + <li > + <a href="../os_cputime_init/">os_cputime_init</a> + </li> + + + + + + <li > + <a href="../os_cputime_nsecs_to_ticks/">os_cputime_nsecs_to_ticks</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_nsecs/">os_cputime_ticks_to_nsecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_ticks_to_usecs/">os_cputime_ticks_to_usecs</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_init/">os_cputime_timer_init</a> + </li> + + + + + + <li class="active"> + <a href="./">os_cputime_timer_relative</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_start/">os_cputime_timer_start</a> + </li> + + + + + + <li > + <a href="../os_cputime_timer_stop/">os_cputime_timer_stop</a> + </li> + + + + + + <li > + <a href="../os_cputime_usecs_to_ticks/">os_cputime_usecs_to_ticks</a> + </li> + + + + </ul> + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../time/os_time/">OS Time</a> + + + </li> + + + + + + + + <li ><a href="../../task/task/">Tasks</a> + + + </li> + + + + + + + + <li ><a href="../../event_queue/event_queue/">Event Queues</a> + + + </li> + + + + + + + + <li ><a href="../../semaphore/semaphore/">Semaphores</a> + + + </li> + + + + + + + + <li ><a href="../../mutex/mutex/">Mutexes</a> + + + </li> + + + + + + + + <li ><a href="../../memory_pool/memory_pool/">Memory Pools</a> + + + </li> + + + + + + + + <li ><a href="../../heap/heap/">Heap</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../mbuf/mbuf/ + +">Memory Buffers</a> + + + </li> + + + + + + + + <li ><a href="../../sanity/sanity/">Sanity</a> + + + </li> + + + + + + + + <li ><a href="../../callout/callout/">Callouts</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../porting/port_os/">Porting to your Platform</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/console/console/">Console</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/shell/shell/">Shell</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/split/split/">Split Images</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/bootloader/bootloader/">Bootloader</a> + + + </li> + + + + + + + + <li><a href=" + + + ../../../modules/fs/fs/fs/ + +">File System</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/hal/hal/">Hardware Abstraction Layer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/drivers/driver/">Drivers</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/testutil/testutil/">Test Utilities</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/devmgmt/newtmgr/">Device Management with Newt Manager</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/imgmgr/imgmgr/">Image Manager</a> + + + </li> + + + + + + <li > + <a href="../../../modules/baselibc/">Baselibc library</a> + </li> + + + + + + + + <li ><a href="../../../modules/json/json/">JSON</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/fcb/fcb/">Flash Circular Buffer</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/stats/stats/">Stats</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/logs/logs/">Logs</a> + + + </li> + + + + + + + + <li ><a href="../../../modules/sysinitconfig/sysinitconfig/">System Configuration And Initialization</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/latest/os/introduction">Docs</a></li> + + + + <li>» <a href="../os_cputime/">CPU Time</a></li> + + + + <li>» <a href="../os_cputime_delay_nsecs/">Functions</a></li> + + + + <li>» os_cputime_timer_relative</li> + + + + </ul> +</div> + </div> + + <h2 id="os_cputime_timer_relative"><font color="F2853F" style="font-size:24pt">os_cputime_timer_relative</font></h2> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">void</span> <span style="color: #000000">os_cputime_timer_relative</span>(<span style="color: #A90D91">struct</span> <span style="color: #000000">hal_timer</span> <span style="color: #000000">*timer</span>, <span style="color: #A90D91">uint32_t</span> <span style="color: #000000">usecs</span>) +</pre></div> + + +<p>Sets a timer to expire in the specified number of microseconds from the current time. The callback function for the timer is called when the timer expires. </p> +<h4 id="arguments">Arguments</h4> +<table> +<thead> +<tr> +<th>Arguments</th> +<th>Description</th> +</tr> +</thead> +<tbody> +<tr> +<td><code>timer</code></td> +<td>Pointer to an initialized hal_timer.</td> +</tr> +<tr> +<td><code>usecs</code></td> +<td>The number of microseconds to set the timer to expire from now.</td> +</tr> +</tbody> +</table> +<h4 id="returned-values">Returned values</h4> +<p>N/A</p> +<h4 id="notes">Notes</h4> +<p><code>timer</code> must be initialized using the <code>os_cputime_timer_init()</code> function before setting up a timer. </p> +<h4 id="example">Example</h4> +<p>`</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"><span style="color: #A90D91">struct</span> <span style="color: #000000">hal_timer</span> <span style="color: #000000">mytimer</span>; + ... + +<span style="color: #000000">os_cputime_timer_relative</span>(<span style="color: #000000">&mytimer</span>, <span style="color: #1C01CE">100</span>); +</pre></div> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../os_cputime_timer_init/> + <span class="fa fa-arrow-left"></span> + Previous: os_cputime_timer_init + </a> + + </li> + <li class="pull-right"> + + <a href=../os_cputime_timer_start/> + Next: os_cputime_timer_start + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file
