function start() { if ($this->estado == 0) { //solo se puede empezar si esta parada //se crea un tiempo $tiempo = new Tiempo(); $tiempo->crear($this->id); //se cambia el estado de la tarea $this->setEstado(1); $this->dbsave(); return true; } }