You are here

function progress_initialize_progress in Progress 8

Same name and namespace in other branches
  1. 6 progress.module \progress_initialize_progress()
  2. 7 progress.module \progress_initialize_progress()

Initialize a progress

File

./progress.module, line 18
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();
}