Millisecond in timestamp


Is there any way we can get millisecond in timestamp? I realize there’s date() & time() function, but I guess it’s only give second as the smallest unit if I’m not wrong

I use this

hardware.millis() – free-running millisecond ticker

do you append it to the timestamp or just use it as a millisecond timer?
I need the millisecond as part of the timestamp. Perhaps I need to do this manually?

When I do something; like take a new temperature reading for process control, I save the current value

in this snippet, I calculate the slope of a temperature rise. After using the timestamp, set tmprevious equal to it so I can use that the next time through the

tmstamp = hardware.millis();



the counter just keeps going up and so you would need to consider what happens when it wraps

thanks for the reply
I get the timestamp of first the data was logged and the millis difference for each of the data