Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'test/locks_critical_section_nested.sh')
-rw-r--r--test/locks_critical_section_nested.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/locks_critical_section_nested.sh b/test/locks_critical_section_nested.sh
index 754334ed..db313394 100644
--- a/test/locks_critical_section_nested.sh
+++ b/test/locks_critical_section_nested.sh
@@ -30,10 +30,10 @@ assert 1 ${main_siginfo} "INFO should be trapped"
# Acquire TEST
{
- time=$(date +%s)
+ time=$(clock -monotonic)
lock_acquire TEST ${SLEEPTIME}
assert 0 $? "lock_acquire failed"
- nowtime=$(date +%s)
+ nowtime=$(clock -monotonic)
elapsed=$((${nowtime} - ${time}))
if [ ${elapsed} -ge ${SLEEPTIME} ]; then
result=slept
@@ -48,10 +48,10 @@ assert 1 ${main_siginfo} "INFO should be trapped"
# Acquire TEST2
{
- time=$(date +%s)
+ time=$(clock -monotonic)
lock_acquire TEST2 ${SLEEPTIME}
assert 0 $? "lock_acquire failed"
- nowtime=$(date +%s)
+ nowtime=$(clock -monotonic)
elapsed=$((${nowtime} - ${time}))
if [ ${elapsed} -ge ${SLEEPTIME} ]; then
result=slept