summaryrefslogtreecommitdiff
path: root/tex/context/base/mkii
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-03-10 15:42:39 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-03-10 15:42:39 +0100
commit0b0256403b7e111df0ecdb8ca589f20df787dacd (patch)
tree49b02d80ccbb26aa235351ae3dfd2d099635ea72 /tex/context/base/mkii
parent631a40d69d7fb4e5beff90039d21da5472dd1020 (diff)
downloadcontext-0b0256403b7e111df0ecdb8ca589f20df787dacd.tar.gz
2020-03-10 14:47:00
Diffstat (limited to 'tex/context/base/mkii')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/syst-new.mkii32
3 files changed, 27 insertions, 9 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 682160a36..5c13c209d 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2020.02.17 12:06}
+\newcontextversion{2020.03.10 14:44}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index bc6869fec..db1940639 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.02.17 12:06}
+\edef\contextversion{2020.03.10 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/syst-new.mkii b/tex/context/base/mkii/syst-new.mkii
index 34b535b90..5a515dbab 100644
--- a/tex/context/base/mkii/syst-new.mkii
+++ b/tex/context/base/mkii/syst-new.mkii
@@ -315,17 +315,25 @@
% awaiting the definitive implementation
+\let\normalelapsedtime\elapsedtime
+
\ifx\resettimer\undefined
\let\resettimer \relax
\newcount\elapsedtime
\fi
\newcount\featuretest
-
-\def\testfeature#1#2%
- {\def\dotestfeature
- {\advance\featuretest \plusone
- \ifnum\featuretest>#1\else#2\expandafter\dotestfeature\fi}%
+\newcount\noffeaturetest
+\newcount\featuretesttime
+
+\def\testfeature#1#2% brought in sync with mkiv
+ {\noffeaturetest#1\relax
+ \def\dotestfeature
+ {\advance\featuretest\plusone
+ \ifnum\featuretest>\noffeaturetest\else#2\expandafter\dotestfeature\fi}%
+ \def\notestfeature
+ {\advance\featuretest\plusone
+ \ifnum\featuretest>\noffeaturetest\else\expandafter\notestfeature\fi}%
\retestfeature}
\def\retestfeature % timer support is new per 10/5/2005
@@ -333,12 +341,22 @@
\ifcase\interactionmode\let\wait\relax\fi
\writestatus\m!systems{starting feature test}\wait
\resettimer
+ \bgroup
+ \featuretest\zerocount \notestfeature
+ \global\featuretesttime\normalelapsedtime
+ \egroup
+ \resettimer
+ \bgroup
\featuretest\zerocount \dotestfeature
- \writestatus\m!systems{feature test done (\elapsedseconds s)}%
+ \egroup
+ \global\featuretesttime\numexpr\normalelapsedtime-\featuretesttime\relax
+ \writestatus\m!systems{feature test done (used: \elapsedseconds s)}%
\wait
\egroup}
-\def\elapsedseconds{\expandafter\withoutpt\the\dimexpr\elapsedtime sp\relax}
+\def\elapsedseconds{\expandafter\withoutpt\the\dimexpr\featuretesttime sp\relax}
+
+\let\elapsedtime\elapsedseconds
\def\showtimer#1%
{\writestatus{runtime}{\elapsedseconds\space s / #1}}