1377 lines
106 KiB
HTML
1377 lines
106 KiB
HTML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<!-- This file is generated by Nim. -->
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
|
|
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
|
|
|
|
<!-- Google fonts -->
|
|
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
|
|
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
|
|
|
|
<!-- CSS -->
|
|
<title>chronos/timer</title>
|
|
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
|
|
|
|
<script type="text/javascript" src="../dochack.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
function main() {
|
|
var pragmaDots = document.getElementsByClassName("pragmadots");
|
|
for (var i = 0; i < pragmaDots.length; i++) {
|
|
pragmaDots[i].onclick = function(event) {
|
|
// Hide tease
|
|
event.target.parentNode.style.display = "none";
|
|
// Show actual
|
|
event.target.parentNode.nextElementSibling.style.display = "inline";
|
|
}
|
|
}
|
|
|
|
function switchTheme(e) {
|
|
if (e.target.checked) {
|
|
document.documentElement.setAttribute('data-theme', 'dark');
|
|
localStorage.setItem('theme', 'dark');
|
|
} else {
|
|
document.documentElement.setAttribute('data-theme', 'light');
|
|
localStorage.setItem('theme', 'light');
|
|
}
|
|
}
|
|
|
|
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
|
|
if (toggleSwitch !== null) {
|
|
toggleSwitch.addEventListener('change', switchTheme, false);
|
|
}
|
|
|
|
var currentTheme = localStorage.getItem('theme');
|
|
if (!currentTheme && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
currentTheme = 'dark';
|
|
}
|
|
if (currentTheme) {
|
|
document.documentElement.setAttribute('data-theme', currentTheme);
|
|
|
|
if (currentTheme === 'dark' && toggleSwitch !== null) {
|
|
toggleSwitch.checked = true;
|
|
}
|
|
}
|
|
}
|
|
|
|
window.addEventListener('DOMContentLoaded', main);
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="document" id="documentId">
|
|
<div class="container">
|
|
<h1 class="title">chronos/timer</h1>
|
|
<div class="row">
|
|
<div class="three columns">
|
|
<div class="theme-switch-wrapper">
|
|
<label class="theme-switch" for="checkbox">
|
|
<input type="checkbox" id="checkbox" />
|
|
<div class="slider round"></div>
|
|
</label>
|
|
<em>Dark Mode</em>
|
|
</div>
|
|
<div id="global-links">
|
|
<ul class="simple">
|
|
<li>
|
|
<a href="../theindex.html">Index</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="searchInputDiv">
|
|
Search: <input type="text" id="searchInput"
|
|
onkeyup="search()" />
|
|
</div>
|
|
<div>
|
|
Group by:
|
|
<select onchange="groupBy(this.value)">
|
|
<option value="section">Section</option>
|
|
<option value="type">Type</option>
|
|
</select>
|
|
</div>
|
|
<ul class="simple simple-toc" id="toc-list">
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
|
|
<ul class="simple simple-toc-section">
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#7" id="57">Types</a>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#Duration"
|
|
title="Duration = object
|
|
value: int64">Duration</a></li>
|
|
<li><a class="reference" href="#Moment"
|
|
title="Moment = object
|
|
value: int64">Moment</a></li>
|
|
<li><a class="reference" href="#SomeIntegerI64"
|
|
title="SomeIntegerI64 = SomeSignedInt | uint8 | uint16 | uint32">SomeIntegerI64</a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#asyncTimer"
|
|
title="asyncTimer = "mono"">asyncTimer</a></li>
|
|
<li><a class="reference" href="#Day"
|
|
title="Day = (value: 86400000000000)">Day</a></li>
|
|
<li><a class="reference" href="#Hour"
|
|
title="Hour = (value: 3600000000000)">Hour</a></li>
|
|
<li><a class="reference" href="#InfiniteDuration"
|
|
title="InfiniteDuration = (value: 9223372036854775807)">InfiniteDuration</a></li>
|
|
<li><a class="reference" href="#Microsecond"
|
|
title="Microsecond = (value: 1000)">Microsecond</a></li>
|
|
<li><a class="reference" href="#Millisecond"
|
|
title="Millisecond = (value: 1000000)">Millisecond</a></li>
|
|
<li><a class="reference" href="#Minute"
|
|
title="Minute = (value: 60000000000)">Minute</a></li>
|
|
<li><a class="reference" href="#Nanosecond"
|
|
title="Nanosecond = (value: 1)">Nanosecond</a></li>
|
|
<li><a class="reference" href="#Second"
|
|
title="Second = (value: 1000000000)">Second</a></li>
|
|
<li><a class="reference" href="#Week"
|
|
title="Week = (value: 604800000000000)">Week</a></li>
|
|
<li><a class="reference" href="#ZeroDuration"
|
|
title="ZeroDuration = (value: 0)">ZeroDuration</a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#12" id="62">Procs</a>
|
|
<ul class="simple simple-toc-section">
|
|
<ul class="simple nested-toc-section">$
|
|
<li><a class="reference" href="#%24%2CDuration"
|
|
title="`$`(a: Duration): string">`$`(a: Duration): string</a></li>
|
|
<li><a class="reference" href="#%24%2CMoment"
|
|
title="`$`(a: Moment): string">`$`(a: Moment): string</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">*
|
|
<li><a class="reference" href="#%2A%2CDuration%2CSomeIntegerI64"
|
|
title="`*`(a: Duration; b: SomeIntegerI64): Duration">`*`(a: Duration; b: SomeIntegerI64): Duration</a></li>
|
|
<li><a class="reference" href="#%2A%2CSomeIntegerI64%2CDuration"
|
|
title="`*`(a: SomeIntegerI64; b: Duration): Duration">`*`(a: SomeIntegerI64; b: Duration): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">+
|
|
<li><a class="reference" href="#%2B%2CDuration%2CDuration"
|
|
title="`+`(a: Duration; b: Duration): Duration">`+`(a: Duration; b: Duration): Duration</a></li>
|
|
<li><a class="reference" href="#%2B%2CDuration%2CMoment"
|
|
title="`+`(a: Duration; b: Moment): Moment">`+`(a: Duration; b: Moment): Moment</a></li>
|
|
<li><a class="reference" href="#%2B%2CMoment%2CDuration"
|
|
title="`+`(a: Moment; b: Duration): Moment">`+`(a: Moment; b: Duration): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">+=
|
|
<li><a class="reference" href="#%2B%3D%2CDuration%2CDuration"
|
|
title="`+=`(a: var Duration; b: Duration)">`+=`(a: var Duration; b: Duration)</a></li>
|
|
<li><a class="reference" href="#%2B%3D%2CMoment%2CDuration"
|
|
title="`+=`(a: var Moment; b: Duration)">`+=`(a: var Moment; b: Duration)</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">-
|
|
<li><a class="reference" href="#-%2CMoment%2CMoment"
|
|
title="`-`(a, b: Moment): Duration">`-`(a, b: Moment): Duration</a></li>
|
|
<li><a class="reference" href="#-%2CDuration%2CDuration"
|
|
title="`-`(a: Duration; b: Duration): Duration">`-`(a: Duration; b: Duration): Duration</a></li>
|
|
<li><a class="reference" href="#-%2CMoment%2CDuration"
|
|
title="`-`(a: Moment; b: Duration): Moment">`-`(a: Moment; b: Duration): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">-=
|
|
<li><a class="reference" href="#-%3D%2CDuration%2CDuration"
|
|
title="`-=`(a: var Duration; b: Duration)">`-=`(a: var Duration; b: Duration)</a></li>
|
|
<li><a class="reference" href="#-%3D%2CMoment%2CDuration"
|
|
title="`-=`(a: var Moment; b: Duration)">`-=`(a: var Moment; b: Duration)</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section"><
|
|
<li><a class="reference" href="#%3C%2CDuration%2CDuration"
|
|
title="`<`(a, b: Duration): bool">`<`(a, b: Duration): bool</a></li>
|
|
<li><a class="reference" href="#%3C%2CMoment%2CMoment"
|
|
title="`<`(a, b: Moment): bool">`<`(a, b: Moment): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section"><=
|
|
<li><a class="reference" href="#%3C%3D%2CDuration%2CDuration"
|
|
title="`<=`(a, b: Duration): bool">`<=`(a, b: Duration): bool</a></li>
|
|
<li><a class="reference" href="#%3C%3D%2CMoment%2CMoment"
|
|
title="`<=`(a, b: Moment): bool">`<=`(a, b: Moment): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">==
|
|
<li><a class="reference" href="#%3D%3D%2CDuration%2CDuration"
|
|
title="`==`(a, b: Duration): bool">`==`(a, b: Duration): bool</a></li>
|
|
<li><a class="reference" href="#%3D%3D%2CMoment%2CMoment"
|
|
title="`==`(a, b: Moment): bool">`==`(a, b: Moment): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">>
|
|
<li><a class="reference" href="#%3E%2CDuration%2CDuration"
|
|
title="`>`(a, b: Duration): bool">`>`(a, b: Duration): bool</a></li>
|
|
<li><a class="reference" href="#%3E%2CMoment%2CMoment"
|
|
title="`>`(a, b: Moment): bool">`>`(a, b: Moment): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">>=
|
|
<li><a class="reference" href="#%3E%3D%2CDuration%2CDuration"
|
|
title="`>=`(a, b: Duration): bool">`>=`(a, b: Duration): bool</a></li>
|
|
<li><a class="reference" href="#%3E%3D%2CMoment%2CMoment"
|
|
title="`>=`(a, b: Moment): bool">`>=`(a, b: Moment): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">days
|
|
<li><a class="reference" href="#days%2CDuration"
|
|
title="days(v: Duration): int64">days(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#days%2CSomeIntegerI64"
|
|
title="days(v: SomeIntegerI64): Duration">days(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">div
|
|
<li><a class="reference" href="#div%2CDuration%2CSomeIntegerI64"
|
|
title="`div`(a: Duration; b: SomeIntegerI64): Duration">`div`(a: Duration; b: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">epochNanoSeconds
|
|
<li><a class="reference" href="#epochNanoSeconds%2CMoment"
|
|
title="epochNanoSeconds(moment: Moment): int64">epochNanoSeconds(moment: Moment): int64</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">epochSeconds
|
|
<li><a class="reference" href="#epochSeconds%2CMoment"
|
|
title="epochSeconds(moment: Moment): int64">epochSeconds(moment: Moment): int64</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">fastEpochTime
|
|
<li><a class="reference" href="#fastEpochTime"
|
|
title="fastEpochTime(): uint64">fastEpochTime(): uint64</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">fromNow
|
|
<li><a class="reference" href="#fromNow%2Ctypedesc%5BMoment%5D%2CDuration"
|
|
title="fromNow(t: typedesc[Moment]; a: Duration): Moment">fromNow(t: typedesc[Moment]; a: Duration): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">hours
|
|
<li><a class="reference" href="#hours%2CDuration"
|
|
title="hours(v: Duration): int64">hours(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#hours%2CSomeIntegerI64"
|
|
title="hours(v: SomeIntegerI64): Duration">hours(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">init
|
|
<li><a class="reference" href="#init%2Ctypedesc%5BMoment%5D%2Cint64%2CDuration"
|
|
title="init(t: typedesc[Moment]; value: int64; precision: Duration): Moment">init(t: typedesc[Moment]; value: int64; precision: Duration): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">isInfinite
|
|
<li><a class="reference" href="#isInfinite%2CDuration"
|
|
title="isInfinite(a: Duration): bool">isInfinite(a: Duration): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">isZero
|
|
<li><a class="reference" href="#isZero%2CDuration"
|
|
title="isZero(a: Duration): bool">isZero(a: Duration): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">micros
|
|
<li><a class="reference" href="#micros%2CDuration"
|
|
title="micros(v: Duration): int64">micros(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#micros%2CSomeIntegerI64"
|
|
title="micros(v: SomeIntegerI64): Duration">micros(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">microseconds
|
|
<li><a class="reference" href="#microseconds%2CDuration"
|
|
title="microseconds(v: Duration): int64">microseconds(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#microseconds%2CSomeIntegerI64"
|
|
title="microseconds(v: SomeIntegerI64): Duration">microseconds(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">millis
|
|
<li><a class="reference" href="#millis%2CDuration"
|
|
title="millis(v: Duration): int64">millis(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#millis%2CSomeIntegerI64"
|
|
title="millis(v: SomeIntegerI64): Duration">millis(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">milliseconds
|
|
<li><a class="reference" href="#milliseconds%2CDuration"
|
|
title="milliseconds(v: Duration): int64">milliseconds(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#milliseconds%2CSomeIntegerI64"
|
|
title="milliseconds(v: SomeIntegerI64): Duration">milliseconds(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">minutes
|
|
<li><a class="reference" href="#minutes%2CDuration"
|
|
title="minutes(v: Duration): int64">minutes(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#minutes%2CSomeIntegerI64"
|
|
title="minutes(v: SomeIntegerI64): Duration">minutes(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">nanos
|
|
<li><a class="reference" href="#nanos%2CDuration"
|
|
title="nanos(v: Duration): int64">nanos(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#nanos%2CSomeIntegerI64"
|
|
title="nanos(v: SomeIntegerI64): Duration">nanos(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">nanoseconds
|
|
<li><a class="reference" href="#nanoseconds%2CDuration"
|
|
title="nanoseconds(v: Duration): int64">nanoseconds(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#nanoseconds%2CSomeIntegerI64"
|
|
title="nanoseconds(v: SomeIntegerI64): Duration">nanoseconds(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">now
|
|
<li><a class="reference" href="#now%2Ctypedesc%5BMoment%5D"
|
|
title="now(t: typedesc[Moment]): Moment">now(t: typedesc[Moment]): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">seconds
|
|
<li><a class="reference" href="#seconds%2CDuration"
|
|
title="seconds(v: Duration): int64">seconds(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#seconds%2CSomeIntegerI64"
|
|
title="seconds(v: SomeIntegerI64): Duration">seconds(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">secs
|
|
<li><a class="reference" href="#secs%2CDuration"
|
|
title="secs(v: Duration): int64">secs(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#secs%2CSomeIntegerI64"
|
|
title="secs(v: SomeIntegerI64): Duration">secs(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">toString
|
|
<li><a class="reference" href="#toString"
|
|
title="toString(a: timer.Duration; parts = int.high): string">toString(a: timer.Duration; parts = int.high): string</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">weeks
|
|
<li><a class="reference" href="#weeks%2CDuration"
|
|
title="weeks(v: Duration): int64">weeks(v: Duration): int64</a></li>
|
|
<li><a class="reference" href="#weeks%2CSomeIntegerI64"
|
|
title="weeks(v: SomeIntegerI64): Duration">weeks(v: SomeIntegerI64): Duration</a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<a class="reference reference-toplevel" href="#18" id="68">Templates</a>
|
|
<ul class="simple simple-toc-section">
|
|
<ul class="simple nested-toc-section">high
|
|
<li><a class="reference" href="#high.t%2Ctypedesc%5BDuration%5D"
|
|
title="high(T: typedesc[Duration]): Duration">high(T: typedesc[Duration]): Duration</a></li>
|
|
<li><a class="reference" href="#high.t%2Ctypedesc%5BMoment%5D"
|
|
title="high(T: typedesc[Moment]): Moment">high(T: typedesc[Moment]): Moment</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">low
|
|
<li><a class="reference" href="#low.t%2Ctypedesc%5BDuration%5D"
|
|
title="low(T: typedesc[Duration]): Duration">low(T: typedesc[Duration]): Duration</a></li>
|
|
<li><a class="reference" href="#low.t%2Ctypedesc%5BMoment%5D"
|
|
title="low(T: typedesc[Moment]): Moment">low(T: typedesc[Moment]): Moment</a></li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L1"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
<div class="nine columns" id="content">
|
|
<div id="tocRoot"></div>
|
|
|
|
<p class="module-desc"><p>This module implements cross-platform system timer with milliseconds resolution.</p>
|
|
<p>Timer supports two types of clocks: <tt class="docutils literal"><span class="pre">system</span></tt> uses the most fast OS primitive to obtain wall clock time. <tt class="docutils literal"><span class="pre">mono</span></tt> uses monotonic clock time (default).</p>
|
|
<p><tt class="docutils literal"><span class="pre">system</span></tt> clock is affected by discontinuous jumps in the system time. This clock is significantly faster then <tt class="docutils literal"><span class="pre">mono</span></tt> clock in most of the cases.</p>
|
|
<p><tt class="docutils literal"><span class="pre">mono</span></tt> clock is not affected by discontinuous jumps in the system time. This clock is slower then <tt class="docutils literal"><span class="pre">system</span></tt> clock.</p>
|
|
<p>You can specify which timer you want to use <tt class="docutils literal"><span class="pre">-d:asyncTimer=<system/mono></span></tt>.</p>
|
|
</p>
|
|
<div class="section" id="6">
|
|
<h1><a class="toc-backref" href="#6">Imports</a></h1>
|
|
<dl class="item">
|
|
<a class="reference external" href="osdefs.html">osdefs</a>
|
|
</dl></div>
|
|
<div class="section" id="7">
|
|
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
|
<dl class="item">
|
|
<div id="Duration">
|
|
<dt><pre><a href="timer.html#Duration"><span class="Identifier">Duration</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
|
|
<span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">int64</span>
|
|
</pre></dt>
|
|
<dd>
|
|
|
|
A Duration is the interval between to points in time.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L149"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L149" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Moment">
|
|
<dt><pre><a href="timer.html#Moment"><span class="Identifier">Moment</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
|
|
<span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">int64</span>
|
|
</pre></dt>
|
|
<dd>
|
|
|
|
A Moment in time. Its value has no direct meaning, but can be compared with other Moments. Moments are captured using a monotonically non-decreasing clock (by default).
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L143"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L143" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="SomeIntegerI64">
|
|
<dt><pre><a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a> <span class="Other">=</span> <span class="Identifier">SomeSignedInt</span> <span class="Operator">|</span> <span class="Identifier">uint8</span> <span class="Operator">|</span> <span class="Identifier">uint16</span> <span class="Operator">|</span> <span class="Identifier">uint32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L156"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L156" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl></div>
|
|
<div class="section" id="10">
|
|
<h1><a class="toc-backref" href="#10">Consts</a></h1>
|
|
<dl class="item">
|
|
<div id="asyncTimer">
|
|
<dt><pre><a href="timer.html#asyncTimer"><span class="Identifier">asyncTimer</span></a> <span class="Other">=</span> <span class="StringLit">"mono"</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L28"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L28" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Day">
|
|
<dt><pre><a href="timer.html#Day"><span class="Identifier">Day</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">86400000000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L263"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L263" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Hour">
|
|
<dt><pre><a href="timer.html#Hour"><span class="Identifier">Hour</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">3600000000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L262"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L262" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="InfiniteDuration">
|
|
<dt><pre><a href="timer.html#InfiniteDuration"><span class="Identifier">InfiniteDuration</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">9223372036854775807</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L267"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L267" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Microsecond">
|
|
<dt><pre><a href="timer.html#Microsecond"><span class="Identifier">Microsecond</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">1000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L258"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L258" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Millisecond">
|
|
<dt><pre><a href="timer.html#Millisecond"><span class="Identifier">Millisecond</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">1000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L259"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L259" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Minute">
|
|
<dt><pre><a href="timer.html#Minute"><span class="Identifier">Minute</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">60000000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L261"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L261" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Nanosecond">
|
|
<dt><pre><a href="timer.html#Nanosecond"><span class="Identifier">Nanosecond</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">1</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L257"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L257" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Second">
|
|
<dt><pre><a href="timer.html#Second"><span class="Identifier">Second</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">1000000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L260"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L260" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="Week">
|
|
<dt><pre><a href="timer.html#Week"><span class="Identifier">Week</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">604800000000000</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L264"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L264" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="ZeroDuration">
|
|
<dt><pre><a href="timer.html#ZeroDuration"><span class="Identifier">ZeroDuration</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">value</span><span class="Other">:</span> <span class="DecNumber">0</span><span class="Other">)</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L266"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L266" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl></div>
|
|
<div class="section" id="12">
|
|
<h1><a class="toc-backref" href="#12">Procs</a></h1>
|
|
<dl class="item">
|
|
<div id="$,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%24%2CDuration"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns string representation of Duration <tt class="docutils literal"><span class="pre">a</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L405"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L405" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="$,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%24%2CMoment"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns string representation of Moment <tt class="docutils literal"><span class="pre">a</span></tt> as nanoseconds value.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L409"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L409" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="*,Duration,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2A%2CDuration%2CSomeIntegerI64"><span class="Identifier">`*`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns Duration multiplied by scalar integer.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L244"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L244" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="*,SomeIntegerI64,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2A%2CSomeIntegerI64%2CDuration"><span class="Identifier">`*`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns Duration multiplied by scalar integer.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L248"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L248" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="+=,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2B%3D%2CDuration%2CDuration"><span class="Identifier">`+=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Duration += Duration
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L174"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L174" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="+=,Moment,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2B%3D%2CMoment%2CDuration"><span class="Identifier">`+=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Moment += Duration
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L170"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L170" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="+,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2B%2CDuration%2CDuration"><span class="Identifier">`+`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Duration + Duration = Duration
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L158"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L158" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="+,Duration,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2B%2CDuration%2CMoment"><span class="Identifier">`+`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Duration + Moment = Moment
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L162"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L162" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="+,Moment,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%2B%2CMoment%2CDuration"><span class="Identifier">`+`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Moment + Duration = Moment
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L166"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L166" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="-=,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#-%3D%2CDuration%2CDuration"><span class="Identifier">`-=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Duration -= Duration
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L196"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L196" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="-=,Moment,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#-%3D%2CMoment%2CDuration"><span class="Identifier">`-=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Moment -= Duration
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L200"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L200" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="-,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#-%2CMoment%2CMoment"><span class="Identifier">`-`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
<p>Moment - Moment = Duration</p>
|
|
<p>Note: Duration can't be negative.</p>
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L178"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L178" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="-,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#-%2CDuration%2CDuration"><span class="Identifier">`-`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
<p>Duration - Duration = Duration</p>
|
|
<p>Note: Duration can't be negative.</p>
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L190"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L190" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="-,Moment,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#-%2CMoment%2CDuration"><span class="Identifier">`-`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
<p>Moment - Duration = Moment</p>
|
|
<p>Note: Moment can be negative</p>
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L184"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L184" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="<=,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3C%3D%2CDuration%2CDuration"><span class="Identifier">`<=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> less or equal <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L220"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L220" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="<=,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3C%3D%2CMoment%2CMoment"><span class="Identifier">`<=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> less or equal <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L224"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L224" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="<,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3C%2CDuration%2CDuration"><span class="Identifier">`<`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> less then <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L212"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L212" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="<,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3C%2CMoment%2CMoment"><span class="Identifier">`<`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> less then <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L216"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L216" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="==,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3D%3D%2CDuration%2CDuration"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> equal to <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L204"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L204" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="==,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3D%3D%2CMoment%2CMoment"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> equal to <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L208"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L208" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id=">=,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3E%3D%2CDuration%2CDuration"><span class="Identifier">`>=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> bigger or equal <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L236"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L236" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id=">=,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3E%3D%2CMoment%2CMoment"><span class="Identifier">`>=`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> bigger or equal <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L240"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L240" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id=">,Duration,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3E%2CDuration%2CDuration"><span class="Identifier">`>`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> bigger then <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L228"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L228" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id=">,Moment,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#%3E%2CMoment%2CMoment"><span class="Identifier">`>`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if <tt class="docutils literal"><span class="pre">a</span></tt> bigger then <tt class="docutils literal"><span class="pre">b</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L232"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L232" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="div,Duration,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#div%2CDuration%2CSomeIntegerI64"><span class="Identifier">`div`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">;</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns Duration which is result of dividing a Duration by scalar integer.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L252"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L252" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="days,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#days%2CDuration"><span class="Identifier">days</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to days.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L337"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L337" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="days,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#days%2CSomeIntegerI64"><span class="Identifier">days</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with days value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L305"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L305" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="epochNanoSeconds,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#epochNanoSeconds%2CMoment"><span class="Identifier">epochNanoSeconds</span></a><span class="Other">(</span><span class="Identifier">moment</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L437"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L437" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="epochSeconds,Moment">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#epochSeconds%2CMoment"><span class="Identifier">epochSeconds</span></a><span class="Other">(</span><span class="Identifier">moment</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L434"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L434" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="fastEpochTime">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fastEpochTime"><span class="Identifier">fastEpochTime</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">uint64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">"Use Moment.now()"</span><span class="Other">,</span>
|
|
<span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
<div class="deprecation-message">
|
|
<b>Deprecated:</b> Use Moment.now()
|
|
</div>
|
|
|
|
Procedure's resolution is millisecond.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L125"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L125" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="fromNow,typedesc[Moment],Duration">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#fromNow%2Ctypedesc%5BMoment%5D%2CDuration"><span class="Identifier">fromNow</span></a><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns moment in time which is equal to current moment + Duration.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L440"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L440" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="hours,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#hours%2CDuration"><span class="Identifier">hours</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to hours.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L333"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L333" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="hours,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#hours%2CSomeIntegerI64"><span class="Identifier">hours</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with hours value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L301"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L301" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="init,typedesc[Moment],int64,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#init%2Ctypedesc%5BMoment%5D%2Cint64%2CDuration"><span class="Identifier">init</span></a><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <span class="Identifier">int64</span><span class="Other">;</span> <span class="Identifier">precision</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.
|
|
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Moment with absolute time value <tt class="docutils literal"><span class="pre">value</span></tt> with precision <tt class="docutils literal"><span class="pre">precision</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L429"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L429" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="isInfinite,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#isInfinite%2CDuration"><span class="Identifier">isInfinite</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if Duration <tt class="docutils literal"><span class="pre">a</span></tt> is infinite.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L421"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L421" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="isZero,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#isZero%2CDuration"><span class="Identifier">isZero</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns <tt class="docutils literal"><span class="pre">true</span></tt> if Duration <tt class="docutils literal"><span class="pre">a</span></tt> is <tt class="docutils literal"><span class="pre">0</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L417"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L417" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="micros,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#micros%2CDuration"><span class="Identifier">micros</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L360"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L360" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="micros,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#micros%2CSomeIntegerI64"><span class="Identifier">micros</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L348"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L348" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="microseconds,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#microseconds%2CDuration"><span class="Identifier">microseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to microseconds.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L317"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L317" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="microseconds,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#microseconds%2CSomeIntegerI64"><span class="Identifier">microseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with microseconds value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L285"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L285" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="millis,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#millis%2CDuration"><span class="Identifier">millis</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L363"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L363" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="millis,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#millis%2CSomeIntegerI64"><span class="Identifier">millis</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L351"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L351" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="milliseconds,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#milliseconds%2CDuration"><span class="Identifier">milliseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to milliseconds.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L321"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L321" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="milliseconds,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#milliseconds%2CSomeIntegerI64"><span class="Identifier">milliseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with milliseconds value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L289"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L289" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="minutes,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#minutes%2CDuration"><span class="Identifier">minutes</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to minutes.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L329"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L329" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="minutes,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#minutes%2CSomeIntegerI64"><span class="Identifier">minutes</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with minutes value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L297"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L297" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="nanos,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#nanos%2CDuration"><span class="Identifier">nanos</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L357"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L357" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="nanos,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#nanos%2CSomeIntegerI64"><span class="Identifier">nanos</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L345"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L345" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="nanoseconds,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#nanoseconds%2CDuration"><span class="Identifier">nanoseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to nanoseconds.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L313"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L313" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="nanoseconds,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#nanoseconds%2CSomeIntegerI64"><span class="Identifier">nanoseconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with nanoseconds value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L281"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L281" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="now,typedesc[Moment]">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#now%2Ctypedesc%5BMoment%5D"><span class="Identifier">now</span></a><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns current moment in time as Moment.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L425"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L425" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="seconds,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#seconds%2CDuration"><span class="Identifier">seconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to seconds.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L325"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L325" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="seconds,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#seconds%2CSomeIntegerI64"><span class="Identifier">seconds</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with seconds value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L293"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L293" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="secs,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#secs%2CDuration"><span class="Identifier">secs</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L366"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L366" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="secs,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#secs%2CSomeIntegerI64"><span class="Identifier">secs</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L354"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L354" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="toString">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#toString"><span class="Identifier">toString</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <span class="Identifier">timer</span><span class="Other">.</span><span class="Identifier">Duration</span><span class="Other">;</span> <span class="Identifier">parts</span> <span class="Other">=</span> <span class="Identifier">int</span><span class="Other">.</span><span class="Identifier">high</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
|
|
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Returns a pretty string representation of Duration <tt class="docutils literal"><span class="pre">a</span></tt> - the number of parts returned can be limited thus truncating the output to an approximation that grows more precise as the duration becomes smaller
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L373"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L373" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="weeks,Duration">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#weeks%2CDuration"><span class="Identifier">weeks</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int64</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Round Duration <tt class="docutils literal"><span class="pre">v</span></tt> to weeks.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L341"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L341" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="weeks,SomeIntegerI64">
|
|
<dt><pre><span class="Keyword">func</span> <a href="#weeks%2CSomeIntegerI64"><span class="Identifier">weeks</span></a><span class="Other">(</span><span class="Identifier">v</span><span class="Other">:</span> <a href="timer.html#SomeIntegerI64"><span class="Identifier">SomeIntegerI64</span></a><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
|
|
<dd>
|
|
|
|
Initialize Duration with weeks value <tt class="docutils literal"><span class="pre">v</span></tt>.
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L309"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L309" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl></div>
|
|
<div class="section" id="18">
|
|
<h1><a class="toc-backref" href="#18">Templates</a></h1>
|
|
<dl class="item">
|
|
<div id="high.t,typedesc[Duration]">
|
|
<dt><pre><span class="Keyword">template</span> <a href="#high.t%2Ctypedesc%5BDuration%5D"><span class="Identifier">high</span></a><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L275"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L275" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="high.t,typedesc[Moment]">
|
|
<dt><pre><span class="Keyword">template</span> <a href="#high.t%2Ctypedesc%5BMoment%5D"><span class="Identifier">high</span></a><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L269"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L269" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="low.t,typedesc[Duration]">
|
|
<dt><pre><span class="Keyword">template</span> <a href="#low.t%2Ctypedesc%5BDuration%5D"><span class="Identifier">low</span></a><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Duration"><span class="Identifier">Duration</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Duration"><span class="Identifier">Duration</span></a></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L278"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L278" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
<div id="low.t,typedesc[Moment]">
|
|
<dt><pre><span class="Keyword">template</span> <a href="#low.t%2Ctypedesc%5BMoment%5D"><span class="Identifier">low</span></a><span class="Other">(</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">typedesc</span><span class="Other">[</span><a href="timer.html#Moment"><span class="Identifier">Moment</span></a><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <a href="timer.html#Moment"><span class="Identifier">Moment</span></a></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a
|
|
href="https://github.com/status-im/nim-chronos/tree/master/chronos/timer.nim#L272"
|
|
class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/status-im/nim-chronos/edit/devel/chronos/timer.nim#L272" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="twelve-columns footer">
|
|
<span class="nim-sprite"></span>
|
|
<br/>
|
|
<small style="color: var(--hint);">Made with Nim. Generated: 2024-11-28 08:22:46 UTC</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|