浏览代码

Start seconds counter at start of function

Bob Mottram 7 年前
父节点
当前提交
af4755f2da
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/freedombone-app-tox

+ 1
- 1
src/freedombone-app-tox 查看文件

426
 }
426
 }
427
 
427
 
428
 function mesh_tox_node {
428
 function mesh_tox_node {
429
+    SECONDS=0
429
     # obtain commits from the main file
430
     # obtain commits from the main file
430
     TOXCORE_COMMIT_MAIN=$(grep "TOXCORE_COMMIT=" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox" | head -n 1 | awk -F "'" '{print $2}')
431
     TOXCORE_COMMIT_MAIN=$(grep "TOXCORE_COMMIT=" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox" | head -n 1 | awk -F "'" '{print $2}')
431
     if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then
432
     if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then
533
         systemctl enable tox-bootstrapd.service
534
         systemctl enable tox-bootstrapd.service
534
     fi
535
     fi
535
 
536
 
536
-    SECONDS=0
537
     if [ ! -f "$rootdir/usr/local/bin/tox-bootstrapd" ]; then
537
     if [ ! -f "$rootdir/usr/local/bin/tox-bootstrapd" ]; then
538
         duration=$SECONDS
538
         duration=$SECONDS
539
         echo $"Toxcore compile failed at $((duration / 60)) minutes and $((duration % 60)) seconds elapsed."
539
         echo $"Toxcore compile failed at $((duration / 60)) minutes and $((duration % 60)) seconds elapsed."