File: 004-timer

package info (click to toggle)
pv 0.9.6-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 688 kB
  • ctags: 241
  • sloc: ansic: 2,003; sh: 471; makefile: 51; perl: 23
file content (14 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
#
# Check that the elapsed time counter does count up.

# Transfer a zero amount of data, but take 3 seconds to do it.
#
(sleep 3 | $PROG -f -t >/dev/null) 2>&1 | tr '\r' '\n' > $TMP1

# Count the number of different timer values; it should be >1.
#
NUM=`sort < $TMP1 | uniq -u | wc -l | tr -d ' '`
test $NUM -gt 1

# EOF