USNavalResearchLaboratory / mgen

Multi-Generator (MGEN) traffic generation tool
https://www.nrl.navy.mil/itd/ncs/products/mgen
Other
83 stars 26 forks source link

Add EPOCH_TIMESTAMP conditional compile flag #10

Closed eschreiber-alink closed 4 years ago

eschreiber-alink commented 4 years ago

Add EPOCH_TIMESTAMP conditional compile flag. Changes mgen log format to use a decimal timestamp using timeval fields in format of tv_sec.tv_usec. The format avoids midnight rollover. The compile flag is off by default preserving the existing timestamp format.

bebopagogo commented 4 years ago

I also think this might be useful as a runtime option, too. One thing to note is the existing binary log format option does already provide a full Unix timestamp for each event.

eschreiber-alink commented 4 years ago

Agreed that it's preferable as a runtime option. I'll see if I can rework it that way.

Thanks for the tip on the binary log format - I wasn't aware.