summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/plain.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/base/plain.asy')
-rw-r--r--graphics/asymptote/base/plain.asy34
1 files changed, 11 insertions, 23 deletions
diff --git a/graphics/asymptote/base/plain.asy b/graphics/asymptote/base/plain.asy
index 57bdb411a9..365aad02c7 100644
--- a/graphics/asymptote/base/plain.asy
+++ b/graphics/asymptote/base/plain.asy
@@ -39,6 +39,8 @@ include plain_markers;
include plain_arrows;
include plain_debugger;
+real RELEASE=(real) split(VERSION,"-")[0];
+
typedef void exitfcn();
void updatefunction()
@@ -145,7 +147,7 @@ void initdefaults()
atexit(null);
}
-// Return the sequence n,...m
+// Return the sequence n,...,m
int[] sequence(int n, int m)
{
return sequence(new int(int x){return x;},m-n+1)+n;
@@ -244,6 +246,7 @@ void beep()
struct processtime {
real user;
real system;
+ real clock;
}
struct cputime {
@@ -257,16 +260,21 @@ cputime cputime()
static processtime last;
real [] a=_cputime();
cputime cputime;
+ real clock=a[4];
cputime.parent.user=a[0];
cputime.parent.system=a[1];
+ cputime.parent.clock=clock;
cputime.child.user=a[2];
cputime.child.system=a[3];
- real user=a[0]+a[2];
- real system=a[1]+a[3];
+ cputime.child.clock=0;
+ real user=cputime.parent.user+cputime.child.user;
+ real system=cputime.parent.system+cputime.child.system;
cputime.change.user=user-last.user;
cputime.change.system=system-last.system;
+ cputime.change.clock=clock-last.clock;
last.user=user;
last.system=system;
+ last.clock=clock;
return cputime;
}
@@ -298,23 +306,3 @@ if(settings.autoimport != "") {
}
cputime();
-
-void nosetpagesize()
-{
- static bool initialized=false;
- if(!initialized && latex()) {
- // Portably pass nosetpagesize option to graphicx package.
- texpreamble("\usepackage{ifluatex}\ifluatex
-\ifx\pdfpagewidth\undefined\let\pdfpagewidth\paperwidth\fi
-\ifx\pdfpageheight\undefined\let\pdfpageheight\paperheight\fi\else
-\let\paperwidthsave\paperwidth\let\paperwidth\undefined
-\usepackage{graphicx}
-\let\paperwidth\paperwidthsave\fi");
- initialized=true;
- }
-}
-
-nosetpagesize();
-
-if(settings.tex == "luatex")
- texpreamble("\input luatex85.sty");