POV-Ray : Newsgroups : povray.general : Date or time? : Re: Date or time? Server Time
8 Aug 2024 12:25:05 EDT (-0400)
  Re: Date or time?  
From: Bill Dewitt
Date: 30 Dec 2000 23:57:58
Message: <3a4ebcd6$1@news.povray.org>
"Greg M. Johnson" <"gregj;-)56590\""@aol.c;-)om> wrote in message
news:3a4e9b41$1@news.povray.org...
> Any way to access the date or time?  One application would be a
> self-seeding, truly random rand based of current mins & secs.
>

I use something like this...

/// batch file "getinfo.bat"
@echo off
cd C:\
echo " > gottime.txt
echo | more | time | find "Current" >> gottime.txt
echo "; >> gottime.txt

/// povini
  Pre_Frame_Command=C:\Command.com /c c:\getinfo.bat %s %n %k

/// pov file
#fopen MyFile "c:\gottime.txt" read
#read (MyFile,MyInfo)
#fclose MyFile
#declare Seconds   = val(substr(MyInfo, 28, strlen(MyInfo)-29));
#declare Minutes    = val(substr(MyInfo, 25, strlen(MyInfo)-29));

#declare R1 = seed((Minutes/Seconds)*10000) ;


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.