SPeCS Packages Documentation
    Preparing search index...

    Creates a timed task, which will execute 'time' ms after invoking execute

    Hierarchy

    • IntermediateTimer
      • TaskTimer
    Index

    Constructors

    • Parameters

      • $class: Class = ...
      • code: string = "return null;"
      • delay: number = 1
      • returnType: string = "Object"
      • timerName: string = "timedTask"
      • fullPath: boolean = false

      Returns TaskTimer

    Properties

    $timerClass: Field
    access: string
    filename: string | undefined
    name: string
    print: boolean
    printUnit: boolean
    timeUnits: TimeUnits
    DEFAULT_CLASS_NAME: "kadabra.utils.Timers"

    Methods

    • Verifies that join point start is not undefined, that it is inside a function. Additionally, if $end is not undefined, checks if it is inside the same function as $start.

      [Requires] global attribute 'ancestor'.

      Parameters

      • $start: any
      • Optional$end: any
      • OptionalfunctionJpName: string

      Returns boolean

      True if $start is a valid join point for the 'time' function

    • Returns Joinpoint | undefined

      The last join point that was inserted after the $end mark

    • Returns TimeUnits

    • Sets the join point that should be returned by .getAfterJp().

      Parameters

      Returns void

    • Parameters

      • print: boolean

      Returns this

    • Parameters

      • printUnit: boolean

      Returns this

    • Times the code of a given section.

      Parameters

      • $start: Joinpoint

        Starting point of the time measure

      • Optionalprefix: string

        Message that will appear before the time measure. If undefined, empty string will be used.

      • Optional$end: Joinpoint

        Ending point of the time measure. If undefined, measure is done around starting point.

      Returns string | undefined

      Name of the variable that contains the value of the elapsed time.