EMA JAVA API timestamp precision

I find that TIMACT (Fid: 5) always has a 0 value for millisecond (fieldEntry.time().millisecond()). Is the timestamp precision of EMA up to second? Thanks.

Best Answer

  • Tim Smith
    Answer ✓

    Hi,

    TIMACT only goes to seconds from our main Elektron realtime feed so the precision you see will never be anything more than that. We use different format fields for milli and up to nano second. For example TIMACT_NS is the field to look for for up to nanosecond precision (not guaranteed to have that level if the source doesn't supply it).

Answers

  • Hello @hujunhu

    EMA provides the methods to get the timestamp up to nanosecond as shown below:

    case DataTypes.TIME :
    System.out.println(fieldEntry.time().hour() + ":"
    + fieldEntry.time().minute() + ":" + fieldEntry.time().second() + ":"
    + fieldEntry.time().millisecond() + ":" +fieldEntry.time().microsecond()+ ":" +fieldEntry.time().nanosecond());
    break;

    The example output:

    Fid: 14265 Name = QUOTIM_NS DataType: Time Value: 9:26:12:468:952:587

    As Tim Smith said, this is depends on the feed if it sends second/milli/micro/nano second for a field to EMA.


  • Pimchaya.Wongrukun, Thanks.

    However, I find that most of the feeds don't have QUOTIM_NS.
    There is another Fid: 3855 Name = QUOTIM_MS. Why its data type is UInt instead of Time?

    Jun

  • Tim Smith

    Thanks.

    May I know the difference between TIMACT and QUOTIM?

    Regards,

    Jun

  • Hello @hujunhu

    As far as I know, it is the feed's design. However, I do not know the actually reason.