src/Event/Entry.php
public function click($time=null) {
        $this->total++;
        if ( ! $this->timestart ) {
            $this->timestart = (int) ( time() / $this->scale );
        }
        if ( ! $time ) $time = time();
        $time = (int) ($time / $this->scale);
        $delta = $time - $this->timestart;
        if ( $delta < 0 ) $delta = 0;  // 0 is OK
        if ( isset($this->buckets[$delta]) ) {
            $this->buckets[$delta]++;
        } else {
            $this->buckets[$delta] = 1;
        }
    }
public function click($time=null) {
        $this->total++;
        if ( ! $this->timestart ) {
            $this->timestart = (int) ( time() / $this->scale );
        }
        if ( ! $time ) $time = time();
        $time = (int) ($time / $this->scale);
        $delta = $time - $this->timestart;
        if ( $delta < 0 ) $delta = 0;  // 0 is OK
        if ( isset($this->buckets[$delta]) ) {
            $this->buckets[$delta]++;
        } else {
            $this->buckets[$delta] = 1;
        }
    }
public function click ( $ time = null ) { $ this -> total ++ ; if ( ! $ this -> timestart ) { $ this -> timestart = ( int ) ( time ( ) / $ this -> scale ) ; } if ( ! $ time ) $ time = time ( ) ; $ time = ( int ) ( $ time / $ this -> scale ) ; $ delta = $ time - $ this -> timestart ; if ( $ delta < 0 ) $ delta = 0 ; // 0 is OK if ( isset ( $ this -> buckets [ $ delta ] ) ) { $ this -> buckets [ $ delta ] ++ ; } else { $ this -> buckets [ $ delta ] = 1 ; } }
Record a click...
Record a click ...