Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
22b88f98
Commit
22b88f98
authored
Jun 22, 2019
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make kj::Timer subclass kj::MonotonicClock.
parent
0bd7b221
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
timer.h
c++/src/kj/timer.h
+4
-4
No files found.
c++/src/kj/timer.h
View file @
22b88f98
...
...
@@ -31,7 +31,7 @@
namespace
kj
{
class
Timer
{
class
Timer
:
public
MonotonicClock
{
// Interface to time and timer functionality.
//
// Each `Timer` may have a different origin, and some `Timer`s may in fact tick at a different
...
...
@@ -40,7 +40,7 @@ class Timer {
// date as tracked by the system is manually modified.
public
:
virtual
TimePoint
now
()
=
0
;
virtual
TimePoint
now
()
const
=
0
;
// Returns the current value of a clock that moves steadily forward, independent of any
// changes in the wall clock. The value is updated every time the event loop waits,
// and is constant in-between waits.
...
...
@@ -99,7 +99,7 @@ public:
// Set the time to `time` and fire any at() events that have been passed.
// implements Timer ----------------------------------------------------------
TimePoint
now
()
override
;
TimePoint
now
()
const
override
;
Promise
<
void
>
atTime
(
TimePoint
time
)
override
;
Promise
<
void
>
afterDelay
(
Duration
delay
)
override
;
...
...
@@ -127,6 +127,6 @@ Promise<T> Timer::timeoutAfter(Duration delay, Promise<T>&& promise) {
}));
}
inline
TimePoint
TimerImpl
::
now
()
{
return
time
;
}
inline
TimePoint
TimerImpl
::
now
()
const
{
return
time
;
}
}
// namespace kj
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment