#! /usr/local/bin/emacs --script ;;; el-shell --- el shell it -*- quick: t; basic-display: t; lexical-binding: t -*- (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (require 'gpu-luki-lisp) (-> 'el-gpu "el-gpu.elc") (let* ((beg) (tme) (gfx (evenp (random 100))) (gfx-label "/gfx ....") (spc-label " ........") (cmd (string-join command-line-args-left [32])) (pause 3)) (when (su cmd) ;; init (emacs_gpu_init) ;; first (setf beg (luki-time)) (el-shell cmd gfx) (setf tme (* 1000 (- (luki-time) beg))) ($ "gpu text%s %.1f ms" (if gfx gfx-label spc-label) tme) (sleep-for pause) ;; second (setf beg (luki-time)) (el-shell cmd (! gfx)) (setf tme (* 1000 (- (luki-time) beg))) ($ "gpu text%s %.1f ms" (if (! gfx) gfx-label spc-label) tme) (sleep-for pause) ;; quit (emacs_gpu_quit 0)))