1
0
mirror of https://github.com/openpower-cores/a2i.git synced 2026-04-28 04:45:33 +00:00
Files
openpower-cores.a2i/rel/fpga/utils.tcl
2020-06-28 18:40:39 -04:00

28 lines
426 B
Tcl

# utils.tcl
#
proc timestamp {{t ""}} {
if {$t == ""} {
set t [clock seconds]
}
return [clock format $t -format %y%m%d%H%M%S]
}
proc datetime {{t ""}} {
if {$t == ""} {
set t [clock seconds]
}
return [clock format $t -format "%m-%d-%y %I:%M:%S %p %Z"]
}
proc now {} {
return [clock seconds]
}
proc vivado_year {} {
regexp -- {Vivado v(\d\d\d\d)\.*} [version] s year
return $year
}