diff options
Diffstat (limited to 'source/util')
| -rw-r--r-- | source/util/Bytes.mc | 2 | ||||
| -rw-r--r-- | source/util/Clock.mc | 2 | ||||
| -rw-r--r-- | source/util/Diag.mc | 12 | ||||
| -rw-r--r-- | source/util/TestMode.mc | 4 |
4 files changed, 18 insertions, 2 deletions
diff --git a/source/util/Bytes.mc b/source/util/Bytes.mc index a32475a..aa5a28b 100644 --- a/source/util/Bytes.mc +++ b/source/util/Bytes.mc @@ -11,6 +11,8 @@ import Toybox.Lang; import Toybox.StringUtil; +// (:glance): also loaded by the glance, which shows the favourite code (GlanceCode). +(:glance) module Bytes { // Hex text (any case, even length) to bytes. Empty text gives an empty array. diff --git a/source/util/Clock.mc b/source/util/Clock.mc index 44a0e37..6657224 100644 --- a/source/util/Clock.mc +++ b/source/util/Clock.mc @@ -10,6 +10,8 @@ import Toybox.Lang; import Toybox.Time; +// (:glance): also loaded by the glance, which shows the favourite code (GlanceCode). +(:glance) module Clock { const TWO_POW_32 = 4294967296l; diff --git a/source/util/Diag.mc b/source/util/Diag.mc index 0ab121f..8fba19d 100644 --- a/source/util/Diag.mc +++ b/source/util/Diag.mc @@ -56,6 +56,18 @@ module Diag { function firstFrame() as Void { } + // The glance's memory after its first draw (README 18: at most 70 % of + // the glance's 64 KB; `make memtest` checks it). + (:debug) + function glanceMemory() as Void { + var stats = System.getSystemStats(); + System.println("DIAG glance mem_used=" + stats.usedMemory + " mem_total=" + stats.totalMemory); + } + + (:release) + function glanceMemory() as Void { + } + // A screen finished its first draw since it was shown. (:debug) function shown(screen as String) as Void { diff --git a/source/util/TestMode.mc b/source/util/TestMode.mc index 9b5c36f..e583ecf 100644 --- a/source/util/TestMode.mc +++ b/source/util/TestMode.mc @@ -13,7 +13,7 @@ import Toybox.Lang; -(:uitest) +(:uitest, :glance) module TestMode { const ON = true; // 2027-01-15 08:00:26 UTC: 4 s left in a 30 s period, so the detail @@ -22,7 +22,7 @@ module TestMode { const AUTO_LOCK_MS = 10000; } -(:no_uitest) +(:no_uitest, :glance) module TestMode { const ON = false; const NOW = 0l; |
