Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d1957b83
Commit
d1957b83
authored
Feb 05, 2021
by
Max Kellermann
Committed by
Max Kellermann
Feb 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/Chrono: add type alias TimePoint
parent
1b4fd745
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
Chrono.hxx
src/event/Chrono.hxx
+1
-0
FineTimerEvent.hxx
src/event/FineTimerEvent.hxx
+1
-1
TimerList.cxx
src/event/TimerList.cxx
+1
-1
TimerList.hxx
src/event/TimerList.hxx
+1
-1
No files found.
src/event/Chrono.hxx
View file @
d1957b83
...
@@ -30,6 +30,7 @@ namespace Event {
...
@@ -30,6 +30,7 @@ namespace Event {
using
Clock
=
std
::
chrono
::
steady_clock
;
using
Clock
=
std
::
chrono
::
steady_clock
;
using
Duration
=
Clock
::
duration
;
using
Duration
=
Clock
::
duration
;
using
TimePoint
=
Clock
::
time_point
;
}
// namespace Event
}
// namespace Event
...
...
src/event/FineTimerEvent.hxx
View file @
d1957b83
...
@@ -64,7 +64,7 @@ class FineTimerEvent final
...
@@ -64,7 +64,7 @@ class FineTimerEvent final
* When is this timer due? This is only valid if IsPending()
* When is this timer due? This is only valid if IsPending()
* returns true.
* returns true.
*/
*/
Event
::
Clock
::
time_p
oint
due
;
Event
::
TimeP
oint
due
;
public
:
public
:
FineTimerEvent
(
EventLoop
&
_loop
,
Callback
_callback
)
noexcept
FineTimerEvent
(
EventLoop
&
_loop
,
Callback
_callback
)
noexcept
...
...
src/event/TimerList.cxx
View file @
d1957b83
...
@@ -54,7 +54,7 @@ TimerList::Insert(FineTimerEvent &t) noexcept
...
@@ -54,7 +54,7 @@ TimerList::Insert(FineTimerEvent &t) noexcept
}
}
Event
::
Duration
Event
::
Duration
TimerList
::
Run
(
const
Event
::
Clock
::
time_p
oint
now
)
noexcept
TimerList
::
Run
(
const
Event
::
TimeP
oint
now
)
noexcept
{
{
while
(
true
)
{
while
(
true
)
{
auto
i
=
timers
.
begin
();
auto
i
=
timers
.
begin
();
...
...
src/event/TimerList.hxx
View file @
d1957b83
...
@@ -71,5 +71,5 @@ public:
...
@@ -71,5 +71,5 @@ public:
* duration until the next timer expires. Returns a negative
* duration until the next timer expires. Returns a negative
* duration if there is no timeout.
* duration if there is no timeout.
*/
*/
Event
::
Duration
Run
(
Event
::
Clock
::
time_p
oint
now
)
noexcept
;
Event
::
Duration
Run
(
Event
::
TimeP
oint
now
)
noexcept
;
};
};
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