function progress_initialize_progress in Progress 7
Same name and namespace in other branches
- 8 progress.module \progress_initialize_progress()
- 6 progress.module \progress_initialize_progress()
Initialize a progress
Parameters
string $name: Name of progress
string $message: Message for progress
Return value
mixed Result from db execute()
File
- ./
progress.module, line 22 - Progress framework for keeping track of progresses
Code
function progress_initialize_progress($name, $message) {
progress_remove_progress($name);
$current = microtime(TRUE);
return db_insert('progress')
->fields(array(
'name' => $name,
'progress' => 0,
'message' => $message,
'start_stamp' => $current,
'current_stamp' => $current,
))
->execute();
}