Add RateLimiter for rate limiting multicast, not tested yet.
This commit is contained in:
parent
95c0790a88
commit
3af55f4423
6 changed files with 259 additions and 81 deletions
|
@ -347,6 +347,17 @@ public:
|
|||
return ( (1000ULL * (uint64_t)tv.tv_sec) + (uint64_t)(tv.tv_usec / 1000) );
|
||||
};
|
||||
|
||||
/**
|
||||
* @return Current time in seconds since epoch, to the highest available resolution
|
||||
*/
|
||||
static inline double nowf()
|
||||
throw()
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv,(struct timezone *)0);
|
||||
return ( ((double)tv.tv_sec) + (((double)tv.tv_usec) / 1000000.0) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the full contents of a file into a string buffer
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue