sendTime = $scheduleTime; } else if ( $waitDuration ) { $this->sendTime = time() + $waitDuration; } else { $this->sendTime = time(); } $this->text = $text; } /** * Public send function, only sends if the sendTime has passed * * @return boolean, returns true if the message was sent */ public function send() { $is_sent = False; if ( $this->sendTime < time() ) { echo $this->text; $is_sent = True; } return $is_sent; } }