Skip to content

Commit

Permalink
fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gittiver authored Sep 29, 2024
1 parent 4cbe002 commit 9df190f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/crow/task_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ namespace crow
{

/// A class for scheduling functions to be called after a specific
/// amount of ticks. A tick is equal to 1 second.
/// amount of ticks. Ther tick length can be handed over in constructor,
/// the default tick length is equal to 1 second.
class task_timer
{
public:
Expand All @@ -55,10 +56,13 @@ namespace crow

~task_timer() { timer_.cancel(); }

/// Cancel the scheduling of the given task
///
/// \param identifier_type task identifier of the task to cancel.
void cancel(identifier_type id)
{
tasks_.erase(id);
CROW_LOG_DEBUG << "task_timer cancelled: " << this << ' ' << id;
CROW_LOG_DEBUG << "task_timer task cancelled: " << this << ' ' << id;
}

/// Schedule the given task to be executed after the default amount
Expand Down

0 comments on commit 9df190f

Please sign in to comment.