summary refs log blame commit diff stats
path: root/tests/misc/tlastmod.nim
blob: 538b5e6563da988e774d876bfc2c28c0b429e24d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                       
# test the new LastModificationTime() proc

import
  os, times, strutils

proc main() =
  var
    a, b: TTime
  a = getLastModificationTime(paramStr(1))
  b = getLastModificationTime(paramStr(2))
  writeLine(stdout, $a)
  writeLine(stdout, $b)
  if a < b:
    write(stdout, "$2 is newer than $1\n" % [paramStr(1), paramStr(2)])
  else:
    write(stdout, "$1 is newer than $2\n" % [paramStr(1), paramStr(2)])

main()