From 9723563aa821e9c9b881dfe6a082f6301ca69826 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Nov 2015 23:47:43 -0700 Subject: sandbox: Add a way to skip time delays Some tests are slow due to delays which are unnecessary on sandbox. The worst offender is USB where we lose two seconds. Add a way to disable time delays. Signed-off-by: Simon Glass --- arch/sandbox/cpu/state.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arch/sandbox/cpu/state.c') diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index 7e5d03e846..d2a7dc9b45 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -337,6 +337,20 @@ struct sandbox_state *state_get_current(void) return state; } +void state_set_skip_delays(bool skip_delays) +{ + struct sandbox_state *state = state_get_current(); + + state->skip_delays = skip_delays; +} + +bool state_get_skip_delays(void) +{ + struct sandbox_state *state = state_get_current(); + + return state->skip_delays; +} + int state_init(void) { state = &main_state; -- cgit v1.2.3