Get current time

A forum dedicated to George scripting questions
Post Reply
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Get current time

Post by NathanOtano »

Hey! I need to be able to get the current time of my computer but I can't find any geroge command for it. Did I miss something? :mrgreen:
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
Xavier
Posts: 1852
Joined: 01 Oct 2019, 11:08

Re: Get current time

Post by Xavier »

I guess this is what you look for : https://wiki.tvpaint.com/index.php?title=TIME
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Get current time

Post by NathanOtano »

OMGMGGG it was in the language ref all along! thanks :)
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
NathanOtano
Posts: 1187
Joined: 01 Apr 2014, 07:07
Location: Biarritz, France
Contact:

Re: Get current time

Post by NathanOtano »

Found the date function too! thanks
Working on Windows 10
Creator of Disnosc, providing storyboard, animation and design for 2D realistic pictural animation: https://www.disnosc.fr/ - nathanotano@disnosc.fr
Highly interested in animation workflows, I'm open to scripting new TVP functions for individuals and studios.
User avatar
tanglangxia
Posts: 4
Joined: 07 Dec 2010, 11:37

Re: Get current time

Post by tanglangxia »

The current minimum unit for obtaining the system time is seconds. Is there an instruction to reach milliseconds?
User avatar
slowtiger
Posts: 2889
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: Get current time

Post by slowtiger »

MIlliseconds? I think the requirements for timekeeping for billing your jobs go a tad bit too far ...
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
spyderheart
Posts: 124
Joined: 22 Jan 2013, 03:11

Re: Get current time

Post by spyderheart »

I'd like to second the request for millisecond precision. I'm trying to make custom buttons that respond to single, double, triple clicks, etc.
Using seconds works - but crudely. It leaves a lot of room for inaccuracy as the second may or may not change between two clicks - so the user may have double clicked but the script interprets it as a single for example.
Milliseconds would solve the problem for me.
Thanks!
David
--------------------------------------------------------
TVPaint 11.7 Standard
System: 64GB RAM // 3 TB SSD // Core i7 8700K // NVIDIA GTX 1080// Windows 10 Home
Post Reply