In trying to build a very latency sensitive application, that needs to send 100s of messages a seconds, each message having the time field, we wanted to consider optimizing
Do you need the millisecond precision? If not you could simply use time() and deal with the unix timestamp.
time()