#48 clock_gettime nanosecond resolution


In the patch in attachments I've implemented the clock_gettime function.
This patch is related to my discussion on the forum and it's not ready for release yet.
It contains some bug for sure, due to the storage of time references in nanoseconds instead of microseconds.
Maybe it's not convenient to change the storage to save some multiplications, especially on <64bit systems.
A bug exist for sure, it's the "delms" parameter of [packet_enqueue(int dir,const unsigned char *buf,int size,int delms)].
It's of type int, while long or long long is needed. I've not changed this because I'm not sure about the type to use and I don't want to exaggerate.
Using wirefilter "flat" (without limitations from command line and/or from mgmt console) should work and you can test that for large bandwidth
the "counter" isn't used anymore (use the new "showqstaus" from the console if you don't belive me :) ).
Some other performance improvements are on the way.
Notice the patch contains previous posted patches.
To compile with clock_gettime, you will need a patch for configure.ac file. I'll attach this patch in another bug I'll post soon.


  • megurikuru

    megurikuru - 2011-02-14

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks