1 2 3 4 5 6 7 8 9 10 11 12
13 14 15
16 package xdc.runtime;
17
18 /*!
19 * ======== ITimestampClient ========
20 * Timestamp Client Interface
21 *
22 * This interface defines the methods used by client applications to
23 * get timestamp values. It is implemented by the
24 * `{@link xdc.runtime.Timestamp Timestamp}` module.
25 */
26 @DirectCall
27 interface ITimestampClient {
28
29 /*!
30 * ======== get32 ========
31 * Return a 32-bit timestamp
32 *
33 * @a(returns)
34 * Returns a 32-bit timestamp value.
35 * Use `{@link #getFreq}` to convert this value into units of real time.
36 *
37 * @see #get64
38 */
39 Bits32 get32();
40
41 /*!
42 * ======== get64 ========
43 * Return a 64-bit timestamp
44 *
45 * @param(result) pointer to 64-bit result
46 *
47 * This parameter is a pointer to a structure representing a 64-bit
48 * wide timestamp value where the current timestamp is written.
49 *
50 * If the underlying hardware does not support 64-bit resolution, the
51 * `hi` field of `result` is always set to 0; see
52 * `{@link xdc.runtime.Types#Timestamp64}`. So, it is possible for
53 * the `lo` field to wrap around without any change to the `hi` field.
54 * Use `{@link #getFreq}` to convert this value into units of real
55 * time.
56 *
57 * @see #get32
58 */
59 Void get64(Types.Timestamp64 *result);
60
61 /*!
62 * ======== getFreq ========
63 * Get the timestamp timer's frequency (in Hz)
64 *
65 * @param(freq) pointer to a 64-bit result
66 *
67 * This parameter is a pointer to a structure representing a 64-bit
68 * wide frequency value where the timer's frequency (in Hz)
69 * is written; see `{@link xdc.runtime.Types#FreqHz}`.
70 * This function provides a way of converting timestamp
71 * values into units of real time.
72 *
73 * @see #get32
74 * @see #get64
75 */
76 Void getFreq(Types.FreqHz *freq);
77 }
78 79 80
81