Sets one element of the MFTime event-in slot.
C# |
---|
public abstract void Set1Value (
int index,
double value
) |
The following example demonstrates how to write a
timestamp into the first element of a "set_timestamps" field of a
Script node:
C# |
---|
Vrml.EAI.Node script = ...;
Vrml.EAI.Field.EventInMFTime set_timestamps = (Vrml.EAI.Field.EventInMFTime)script.GetEventIn("set_timestamps");
System.DateTime baseTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
System.TimeSpan deltaTime = System.DateTime.UtcNow.Subtract(baseTime);
double currentTime = deltaTime.TotalSeconds;
set_timestamps.Set1Value(0, currentTime);
|