GureWork > espacios de Coworking topalekuak :)
GureWork > espacios de Coworking topalekuak :) > MindTouch dekiwiki > Enhancements > New Timing functions

New Timing functions

     v   < 
     > 

     

    Added Date dekiscript functions

    New functions

    Added some ticks & milliseconds properties & functions for timing purposes (custom development)
    • Date.Ticks : num
      • Current date ticks
    • Date.TicksPerMillisecond : num
      • Ticks per millisecond in this system
    • Date.DiffMilliseconds( ticks1 : num, ticks2 : num) : num
      • Compute the difference between the first and second ticks in milliseconds

    Code

    var nTicks1=Date.Ticks;
    <br/>;"Ticks #1: "..Num.Format(nTicks1,"0");
    var nTicks2=Date.Ticks;
    <br/>;"Ticks #2: "..Num.Format(nTicks2,"0");
    var nDiffTicks=nTicks2-nTicks1;
    <br/>;"Diff Ticks: "..Num.Format(nDiffTicks,"0");
    var nTicksPerMillisecond=Date.TicksPerMillisecond;
    <br/>"Ticks per Millisecond: "..nTicksPerMillisecond;
    var nDiffMilliseconds=Date.DiffMilliseconds(nTicks1,nTicks2);
    <br/>"Diff Milliseconds: "..Num.Format(nDiffMilliseconds,"0.000");
    
    
    

    Result


    Ticks #1: 635332682014748000
    Ticks #2: 635332682014749000
    Diff Ticks: 768
    Ticks per Millisecond: 10000
    Diff Milliseconds: 0,077

     

    :) Interactive discussion

     @erabiltzailea erabili bere horman zuzenean zabaldu nahi baduzu (GureWork-en) 

     Utilice @usuario para publicarlo en su muro inmediatamente (en GureWork) 

     Use @user to publish it on his/her wall immediately (on GureWork) 

     

    Resources

    Releases

    Engine : Runner
    { 
        "#1": "CoDoer-Runner-1", 
        "#2": "CoDoer-Runner-2", 
        "#3": "CoDoer-Runner-3", 
        "#3b": "CoDoer-Runner-3b", 
        "#4": "CoDoer-Runner-4:480"
    }
    Engine : Tester
    { 
        "#1": "CoDoer-Tester-1", 
        "#2": "CoDoer-Tester-1", 
        "#3": "CoDoer-Tester-1", 
        "#3b": "CoDoer-Tester-1", 
        "#4": "CoDoer-Tester-1"
    }
    Widgets
    { 
        "Calculator-CoDoer-4": ":20", 
        "GigyaSocialize-CoDoer-4": ":98", 
        "InteractiveComments-CoDoer-4": ":0", 
        "LinkedHitz-Local-Pref-4": ":32", 
        "LinkedHitz-Local-Prop-4": ":196", 
        "SceneFlow-CoDoer-4": ":92", 
        "TodoList-CoDoer-4": ":13"
    }

     

    Resources

    Releases

    Engine : Runner
    { 
        "#1": "CoDoer-Runner-1", 
        "#2": "CoDoer-Runner-2", 
        "#3": "CoDoer-Runner-3", 
        "#3b": "CoDoer-Runner-3b", 
        "#4": "CoDoer-Runner-4:480"
    }
    Engine : Tester
    { 
        "#1": "CoDoer-Tester-1", 
        "#2": "CoDoer-Tester-1", 
        "#3": "CoDoer-Tester-1", 
        "#3b": "CoDoer-Tester-1", 
        "#4": "CoDoer-Tester-1"
    }
    Widgets
    { 
        "Calculator-CoDoer-4": ":20", 
        "GigyaSocialize-CoDoer-4": ":98", 
        "InteractiveComments-CoDoer-4": ":0", 
        "LinkedHitz-Local-Pref-4": ":32", 
        "LinkedHitz-Local-Prop-4": ":196", 
        "SceneFlow-CoDoer-4": ":92", 
        "TodoList-CoDoer-4": ":13"
    }

    Powered by MindTouch (Expired)