summary refs log tree commit diff stats
path: root/tests/accept/compile/tlastmod.nim
blob: 75b047fc8d7e6ff14d948e98d9a0a0ecff435bc4 (plain) (blame)
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))
  writeln(stdout, $a)
  writeln(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()