Fwd: Timestamp and Timers Questions
Bronson Oka <[email protected]> Mon, 22 Jul 2013 16:57:30 -1000
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAK-=20tomobv552ewt=Ws2SHud+y=oOpiKEJxcjygxpxj9gNKw@mail.gmail.com> |
Hello, I was just wondering if you could answer a few questions about the implementation of the Click Router. I'm trying to implement a protocol Element. The implementation is for testing and verification of the protocol, so precision and speed are a factor. I've been looking at the Click source code for the past few weeks trying to figure out how precise the Timers and Timestamp are. Form what I understand, all the Elements that depend on system time rely on the Timestamp Element. The timestamp.hh header file has a definition for different inline assign() functions, but there are many #if statements that control which macros get defined and I'm not sure how to tell which ones are actually being used when compiling the code. Is there a simple way to tell which #if statements are invoked? This would make it much easier to focus on specific parts of the code. I would also like to ask how the Timestamp gets the system time. I saw that the assign_now() inline function calls current_kernel_time(), but I wasn't able to trace this call back to its origin. When running on Linux, does the Click Router use system calls to get the time (such as POSIX)? I would also greatly appreciate it if you can offer any extra tips for understanding the Timestamp implementation. Thanks for your help.