public function write_setting($data) {
        if (!is_array($data)) {
            return '';
        }

        $seconds = (int)($data['v']*$data['u']);
        if ($seconds < 0) {
            return get_string('errorsetting', 'admin');
        }

        $result = $this->config_write($this->name, $seconds);
        return ($result ? '' : get_string('errorsetting', 'admin'));
    }