1 2 3 4 5 6 7 8 9 10 11
12 /*!
13 * ======== Clock ========
14 * Elapsed time measurement functions
15 */
16 metaonly module Clock {
17
18 /*!
19 * ======== getElapsedTime ========
20 * Get elapsed time from last reset
21 */
22 function getElapsedTime();
23
24 /*!
25 * ======== enable ========
26 * Enable output from this module
27 *
28 * If false, all output is suppressed.
29 *
30 * The initial value of this configuration parameter can be set
31 * on the `xs` command line. For example,
32 * @p(code)
33 * xs -Dxdc.services.global.Clock.enable=true ...
34 * @p
35 * sets the initial value of `enable` to `true`.
36 *
37 * If the value is not set on the command line, its initial value
38 * defaults to `false`.
39 */
40 config Bool enable = false;
41
42 /*!
43 * ======== showMemory ========
44 * Enable memory usage output
45 *
46 * If false, memory usage output is suppressed
47 */
48 config Bool showMemory = false;
49
50 /*!
51 * ======== print ========
52 * Report elapsed time from last reset
53 */
54 void print(String msg);
55
56 /*!
57 * ======== reset ========
58 * Set elapsed time to 0
59 */
60 void reset();
61 }
62 63 64
65