Different timestamp precision

I need to save data with a millisecond precision. However, in some cases (rarely) the data need to have a nanosecond precision.

Is this possible or will everything need to be in nanoseconds then? Will it affect the storage size needed (I have a lot of data and try to minimize the storage needed as much as possible).