Add current timestamp in ms resolution

I am using Node-RED to get values from a Modbus device and store them in a database.
The frequency of the Modbus reading varies but may be as high as 100 ms.
Every row of the database requires two fields, the value and the timestamp of the acquisition time.
I am struggling with the latter. I do not know how to get the current timestamp at the time the Modbus value is obtained.

I have considered using the Inject node at the maximum frequency and drop the messages that do not correspond to the time a value is read. However, the Inject node does not handle frequencies in milliseconds.

I have seen that the trigger node does provide timestamp values in milliseconds frequencies but I do not know how to trigger it once every time I read a value. I could trigger it with the first reading and configure it to send a timestamp every few milliseconds but then it would not be stopped when Modbus readings are over.

What sort of database is it? Most databases allow you to specify a column type that is a timestamp and is automatically filled in with the current time when a record is added.
Alternatively, in a function node, you can use Date.now() to get the current time in milliseconds since 01/01/1970.