UNPKG

@specs-feup/kadabra

Version:

A Java source-to-source compiler written in Typescript

42 lines 2.17 kB
import TimerBase from "@specs-feup/lara/api/lara/code/TimerBase.js"; import { Class, Field, Joinpoint } from "../../Joinpoints.js"; import { TimerUnit } from "@specs-feup/lara/api/lara/util/TimeUnits.js"; type insertOptions = "before" | "after" | "replace"; declare abstract class IntermediateTimer extends TimerBase<Joinpoint> { static readonly DEFAULT_CLASS_NAME = "kadabra.utils.Timers"; access: string; name: string; $timerClass: Field; constructor(name: string, $timerClassInCode: Field, unit: TimerUnit, fullPath: boolean); abstract start($target: Joinpoint, when: insertOptions): string | undefined; abstract stop($target: Joinpoint, when: insertOptions): string | undefined; abstract get($target?: Joinpoint, when?: insertOptions, message?: string): string | undefined; measure($target: Joinpoint, message?: string, $end?: Joinpoint): string | undefined; time($start: Joinpoint, prefix?: string, $end?: Joinpoint): string | undefined; measureCode(action: string, $target?: Joinpoint, when?: insertOptions): string; static insertTimerCode(code: string, $target: Joinpoint, when?: insertOptions): Joinpoint; } export default class Timer extends IntermediateTimer { static millisTimer($targetClass?: Class, timerName?: string, fullPath?: boolean): Timer; static nanoTimer($targetClass?: Class, timerName?: string, fullPath?: boolean): Timer; start($target?: Joinpoint, when?: insertOptions): string; stop($target?: Joinpoint, when?: insertOptions): string; pause($target?: Joinpoint, when?: insertOptions): string; getTime(): string; getCount(): string; getAvg(): string; get($target?: Joinpoint, when?: insertOptions, message?: string): string | undefined; } /** * Creates a timed task, which will execute 'time' ms after invoking execute */ export declare class TaskTimer extends IntermediateTimer { constructor($class?: Class, code?: string, delay?: number, returnType?: string, timerName?: string, fullPath?: boolean); start(): string; stop(): string; ready(): string; get(): string; getAndStart(): string; } export {}; //# sourceMappingURL=Timer.d.ts.map