added age

This commit is contained in:
hummypkg 2013-12-17 23:27:57 +00:00
parent 4540ae4fd9
commit df18688606
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Package: sweeper
Priority: optional
Section: misc
Version: 1.0.8-4
Version: 1.0.9
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif(>=1.0.6-7)

View File

@ -81,6 +81,12 @@ proc ::sweeper::size {ts size} {
return [::sweeper::intcomp [$ts size] $size]
}
proc ::sweeper::age {ts age} {
set recage $(([clock seconds] - [$ts get end]) / 3600)
log " ... Recording age: $recage" 2
return [::sweeper::intcomp $recage $age]
}
proc ::sweeper::definition {ts def} {
return [::sweeper::strcontains [$ts get definition] $def]
}