pastebin - collaborative debugging tool
rovema.kpaste.net RSS

Difference between
modified post 2fc126f3 by Anonymous on Mon 26th Jul 2021 15:08
original post 823ff010 by Anonymous on Mon 26th Jul 2021 15:05
Download diff
Show old version | new version | both versions

    
1+
#!/bin/bash
14
#
25
# busysleep.sh
36
#
47
# like POSIX sleep(1), but uses CPU time
58
69
set -o errexit
710
811
typeset -i start_s
912
typeset -i sleep_time=$1
1013
1114
for ((start_s=SECONDS ;
12-
	(SECONDS-start_s) < sleep_time ;
15+
	(SECONDS-start_s) <= sleep_time ;
1316
	)) ; do
1417
	(( 1 ))
1518
done
1619
1720
exit 0
1821
1922

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at