mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
add a simple tool for formatting a timestamp in ns
This commit is contained in:
parent
7176a2bfa3
commit
0d122b247b
13
tools/development/timestamp.pl
Executable file
13
tools/development/timestamp.pl
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $timestamp = shift(@ARGV);
|
||||
$timestamp *= shift(@ARGV) if @ARGV;
|
||||
|
||||
printf "%02d:%02d:%02d.%09d\n",
|
||||
int($timestamp / 60 / 60 / 1000000000),
|
||||
int($timestamp / 60 / 1000000000) % 60,
|
||||
int($timestamp / 1000000000) % 60,
|
||||
$timestamp % 1000000000;
|
Loading…
Reference in New Issue
Block a user