diff --git a/core/timermanager.h b/core/timermanager.h
index c31568c77c..ffb7fa6ace 100644
--- a/core/timermanager.h
+++ b/core/timermanager.h
@@ -31,8 +31,6 @@ along with this program. If not, see .
#include
#include
-using namespace std;
-
#define NS_PER_SEC 1E9
#define USEC_PER_SEC 1E6
#define NS_PER_USEC 1000UL
@@ -42,7 +40,7 @@ using namespace std;
#define USECS_TO_NSECS(us) (us) * NS_PER_USEC
#define MSECS_TO_NSECS(ms) (ms) * NS_PER_MSEC
-typedef function timer_cb;
+typedef std::function timer_cb;
/** Extend std::priority_queue as suggested here:
https://stackoverflow.com/a/36711682
@@ -101,7 +99,7 @@ typedef struct TimerInfo {
// Custom comparator for sorting our timer queue in ascending order
class MyGtComparator {
public:
- bool operator()(const shared_ptr& l, const shared_ptr& r) {
+ bool operator()(const std::shared_ptr& l, const std::shared_ptr& r) {
return l.get()->timeout_ns > r.get()->timeout_ns;
}
};
@@ -116,7 +114,7 @@ class TimerManager {
};
// callback for retrieving current time
- void set_time_now_cb(const function &cb) {
+ void set_time_now_cb(const std::function &cb) {
this->get_time_now = cb;
};
@@ -142,10 +140,10 @@ class TimerManager {
TimerManager(){}; // private constructor to implement a singleton
// timer queue
- my_priority_queue, vector>, MyGtComparator> timer_queue;
+ my_priority_queue, std::vector>, MyGtComparator> timer_queue;
- function get_time_now;
- function notify_timer_changes;
+ std::function get_time_now;
+ std::function notify_timer_changes;
std::atomic id{0};
bool cb_active = false; // true if a timer callback is executing // FIXME: Do we need this? It gets written in main thread and read in audio thread.