You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
426 B
Tcl

3 years ago
# 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
}