Loïc Grenié on Sun, 14 Sep 2014 07:34:52 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: gettime


2014-09-13 23:22 GMT+02:00 Josef Eschgfaeller <esg@unife.it>:
> python="python -c \"import time; print(time.time())\""
> tstring=externstr(python)
> t100=floor(100*eval(tstring))
> \\ 141064265237 (for example)
> --------------------------------------------------
> Can one do this inside of Pari/GP?
> For example in setting the random seed.
>
> gettime and getabstime give a relative time,
> which usually does not allow different
> experiments if one uses Pari/GP from
> a script file (since the interpreter is
> then initialized for each call and the
> relative times result more or less equal).

     If you have a recent enough version of PARI/GP, then
  walltime() is probably what you are looking for.

      Hope this helps,

          Loïc

time +%s.%N is cheaper than python