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