File: TimeStamp.ijm

package info (click to toggle)
skyview 3.4.2%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,176 kB
  • sloc: java: 29,396; makefile: 18; sh: 1
file content (13 lines) | stat: -rw-r--r-- 335 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
x=20; y=30; size=18;
interval=1; //seconds
i = floor(i*interval); // 'i' is the image index
setFont("SansSerif", size, "antialiased");
setColor("white");
s = ""+pad(floor(i/3600))+":"+pad(floor((i/60)%60))+":"+pad(i%60);
drawString(s, x, y);
function pad(n) {
  str = toString(n);
  if (lengthOf(str)==1) str="0"+str;
  return str;
}