HowTo Page loaded ....

42 views
Skip to first unread message

Nikolai Atanasov

unread,
May 8, 2017, 9:50:12 AM5/8/17
to Fat-Free Framework

Hello, I'm new here and with fat free,
I have a question
HowTo show this --- page was loaded for 0.02564 seconds--- in my web page with fat free

ved

unread,
May 8, 2017, 10:05:08 AM5/8/17
to Fat-Free Framework
Hi and welcome

That's not really specific to F3 and is accomplished using just plain PHP. Here's an example:

Nikolai Atanasov

unread,
May 8, 2017, 10:53:23 AM5/8/17
to Fat-Free Framework
this is my class

<?php

class Timer {

    private $start;

    public function __construct() {
        $this->start = explode(' ', microtime())[0] + explode(' ', microtime())[1];
    }

    public function stop() {
        return  round((explode(' ', microtime())[0] + explode(' ', microtime())[1]) )  - $this->start;
    }
   
    public function reset() {
        $this::__construct();
    }

}

How to show the result in dashBoard.html


And thanks for the quick answer

bcosca

unread,
May 8, 2017, 12:30:19 PM5/8/17
to Fat-Free Framework
Page was loaded in {{ microtime(TRUE) - @TIME }}

Nikolai Atanasov

unread,
May 9, 2017, 6:44:07 AM5/9/17
to Fat-Free Framework
Super Tenks is work :)
Reply all
Reply to author
Forward
0 new messages