Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 252c68e

Browse files
committed
Use UTC Unix timestamps for sent frames
(cherry picked from commit b26c63b)
1 parent 2f3dff4 commit 252c68e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/SolAR/Scripts/v2/SolARCloudHololens2Specific.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ private Frame getPvFrame()
454454
/* flip = */ false /* solARCloud.advancedGrpcSettings.imageCompression != SolARRpc.ImageCompression.None */);
455455
_timestamp = _timestamp / TimeSpan.TicksPerMillisecond;
456456
#endif
457+
// TODO: update native plugin to produce this SolAR timestamp format
458+
_timestamp = (ulong)((DateTimeOffset)DateTime.UtcNow).ToUnixTimeMilliseconds();
459+
457460
if (frameTexture == null)
458461
{
459462
Log(LogLevel.WARNING, "PV buffer is null");
@@ -552,6 +555,9 @@ SolARHololens2UnityPlugin.RMSensorType sensorType
552555
/* flip = */ false /* solARCloud.advancedGrpcSettings.imageCompression != SolARRpc.ImageCompression.None */);
553556
ts = ts / TimeSpan.TicksPerMillisecond;
554557
#endif
558+
// TODO: update native plugin to produce this SolAR timestamp format
559+
ts = (ulong)((DateTimeOffset)DateTime.UtcNow).ToUnixTimeMilliseconds();
560+
555561
if (vclBufferData == null)
556562
{
557563
Log(LogLevel.WARNING, "VLC buffer is null");

0 commit comments

Comments
 (0)