Skip to content

Instantly share code, notes, and snippets.

@p2or
Created November 26, 2016 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p2or/7564b00ff63b3fa1ac2d293df38a15d6 to your computer and use it in GitHub Desktop.
Save p2or/7564b00ff63b3fa1ac2d293df38a15d6 to your computer and use it in GitHub Desktop.
TimeCode #AfterEffects
h=0;m=00;s=0;f=0;
f+=timeToFrames();
s+=Math.floor(f*thisComp.frameDuration);
m+=Math.floor(s/60);
h+=Math.floor(m/60);
f=f%(1/thisComp.frameDuration);
s=s%60;
m=m%60;
if(f<10) {f="0"+f}
if(s<10) {s="0"+s}
if(m<10) {m="0"+m}
if(h<10) {h="0"+h}
h+":"+m+"."+s+"."+f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment