Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2017may10 OS: Linux Language: bash Q. How can I get the millisecond since the epoch? A. Use the + option of the date command.%s is the seconds %N is the nanoseconds %3N is the first 3 digits of the nanoseconds (doesn't work on all systems)So:date '+%s%3N' If %3N works for youOtherwise:$(( $(date +%s%N) / 1000000 ))
Add a commentSign in to add a comment