File: timestamp.pl

package info (click to toggle)
mkvtoolnix 97.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 60,284 kB
  • sloc: cpp: 217,034; ruby: 11,453; xml: 8,125; ansic: 6,885; sh: 5,274; python: 1,041; perl: 191; makefile: 113; awk: 16; javascript: 4
file content (13 lines) | stat: -rwxr-xr-x 294 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
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;