summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-21 13:57:18 -0500
committerSimon Glass <sjg@chromium.org>2015-05-05 20:58:18 -0600
commit909bd6d9729cb0c6ba6b80cdc283bbd3e1e12770 (patch)
tree8e7c974481e3b8979f76a8f687c09bd04b4b6529 /arch/sandbox/include
parent905e8f9e53766e606bd4a0ed46d804889e613f32 (diff)
downloadtalos-obmc-uboot-909bd6d9729cb0c6ba6b80cdc283bbd3e1e12770.tar.gz
talos-obmc-uboot-909bd6d9729cb0c6ba6b80cdc283bbd3e1e12770.zip
sandbox: Add test function to advance time
Add a function that maintains an offset to include in the system timer values returned from the lib/time.c APIs. This will allow timeouts to be skipped instantly in tests Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/test.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index 8e490e96d7..296589c282 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -28,4 +28,12 @@ void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len);
+/*
+ * sandbox_timer_add_offset()
+ *
+ * Allow tests to add to the time reported through lib/time.c functions
+ * offset: number of milliseconds to advance the system time
+ */
+void sandbox_timer_add_offset(unsigned long offset);
+
#endif
OpenPOWER on IntegriCloud