summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runtime.in
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/runtime.in')
-rw-r--r--Build/source/utils/asymptote/runtime.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/Build/source/utils/asymptote/runtime.in b/Build/source/utils/asymptote/runtime.in
index 1f67200f5d2..048689c7891 100644
--- a/Build/source/utils/asymptote/runtime.in
+++ b/Build/source/utils/asymptote/runtime.in
@@ -179,6 +179,8 @@ const item Default=item(default_t());
namespace run {
+stopWatch wallClock;
+
const char *arrayempty="cannot take min or max of empty array";
const char *noruntime="no runtime environment for embedded eval";
@@ -1045,7 +1047,7 @@ realarray *_cputime()
(*t)[1]=((real) buf.tms_stime)*ticktime;
(*t)[2]=((real) buf.tms_cutime)*ticktime;
(*t)[3]=((real) buf.tms_cstime)*ticktime;
- (*t)[4]=utils::totalseconds();
+ (*t)[4]=wallClock.seconds();
return t;
}
@@ -1213,3 +1215,10 @@ bool isometry(transform t)
{
return t.isIsometry();
}
+
+real bezier(real a, real b, real c, real d, real t)
+{
+ real onemt=1-t;
+ real onemt2=onemt*onemt;
+ return onemt2*onemt*a+t*(3.0*(onemt2*b+t*onemt*c)+t*t*d);
+}