mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 07:31:03 +08:00
Merge pull request #490 from pijyoi/master
eliminate dead code moved into zmq_utils.cpp
This commit is contained in:
commit
1eee9ce035
29
src/zmq.cpp
29
src/zmq.cpp
@ -1027,32 +1027,3 @@ void zmq_free_event (void *event_data, void *hint)
|
||||
}
|
||||
free (event_data);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 0MQ utils - to be used by perf tests
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void zmq_sleep (int seconds_)
|
||||
{
|
||||
#if defined ZMQ_HAVE_WINDOWS
|
||||
Sleep (seconds_ * 1000);
|
||||
#else
|
||||
sleep (seconds_);
|
||||
#endif
|
||||
}
|
||||
|
||||
void *zmq_stopwatch_start ()
|
||||
{
|
||||
uint64_t *watch = (uint64_t*) malloc (sizeof (uint64_t));
|
||||
alloc_assert (watch);
|
||||
*watch = zmq::clock_t::now_us ();
|
||||
return (void*) watch;
|
||||
}
|
||||
|
||||
unsigned long zmq_stopwatch_stop (void *watch_)
|
||||
{
|
||||
uint64_t end = zmq::clock_t::now_us ();
|
||||
uint64_t start = *(uint64_t*) watch_;
|
||||
free (watch_);
|
||||
return (unsigned long) (end - start);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user