Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
程煊 committed Aug 26, 2019
1 parent b29165d commit 13b09e6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,18 @@ function install_vimplus_on_linux()
fi
}

# 获取当前时间戳
function get_now_timestamp()
{
cur_sec_and_ns=`date '+%s-%N'`
echo ${cur_sec_and_ns%-*}
}

# main函数
function main()
{
begin=`get_now_timestamp`

type=`get_platform_type`
echo "Platform type: "${type}

Expand All @@ -405,6 +414,11 @@ function main()
else
echo "Not support platform type: "${type}
fi

end=`get_now_timestamp`
second=`expr ${end} - ${begin}`
min=`expr ${second} / 60`
echo "It takes "${min}" minutes."
}

# 调用main函数
Expand Down

0 comments on commit 13b09e6

Please sign in to comment.