git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning

From
MMMikael Magnusson <mikachu@gmail.com>
Date
Aug 30, 2015, 08:04 UTC
Message-ID
<CAHYJk3RXtS0d7mKNExbmX==O7PiTj=2m9ik3npO5_b5HV44_QA@mail.gmail.com>
In-Reply-To
<CAPig+cTCQa6Vev2u4V-CbU1B5BGdrSk+8bjLE2Y1YBLog5Ehnw@mail.gmail.com>
On Sun, Aug 30, 2015 at 5:15 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 14 quoted lines
> (Please don't top-post on this list.)
>
> On Sat, Aug 29, 2015 at 11:00 PM, Gabor Bernat <bernat@primeranks.net> wrote:
>> Reading after it, I think the most close we can get with this is, awk
>> 'BEGIN { print strftime("%c", 1271603087); }; and just ignore setting
>> this value (and avoid displaying it) if that fails too. Do you agree?
>
> strftime() in awk is a GNU-ism. It doesn't exist in awk on Mac OS X or
> FreeBSD, or even the default awk on Linux (which is mawk on Linux
> installations I've checked).
>
> Most portable likely would be Perl, however, that's probably too
> heavyweight inside a loop like this, even if called only once each N
> iterations.

http://stackoverflow.com/questions/2445198/get-seconds-since-epoch-in-any-posix-compliant-shell Found this,

awk 'BEGIN{srand();print srand()}'

srand() in awk returns the previous seed value, and calling it without an argument sets it to time of day, so the above sequence should return seconds since the epoch, or at least something in seconds that is relative to a fixed point which is all that's needed in this thread.

-- 
Mikael Magnusson
Previous: Eric SunshineNext: Gabor Bernat
Message 14 of 24 in “[FEATURE REQUEST] Filter-branch extend progress with a simple estimated time remaning”
  1. Gabor BernatAug 25, 2015
  2. Jeff KingAug 25, 2015
  3. Junio C HamanoAug 25, 2015
  4. Jeff KingAug 25, 2015
  5. Jeff KingAug 25, 2015
  6. Gabor BernatAug 25, 2015
  7. Eric SunshineAug 25, 2015
  8. Jeff KingAug 26, 2015
  9. Gabor BernatAug 29, 2015
  10. Gabor BernatAug 29, 2015
  11. Eric SunshineAug 30, 2015
  12. Gabor BernatAug 30, 2015
  13. Eric SunshineAug 30, 2015
  14. Mikael MagnussonAug 30, 2015
  15. Gabor BernatAug 30, 2015
  16. Mikael MagnussonAug 30, 2015
  17. Eric SunshineAug 30, 2015
  18. Junio C HamanoAug 30, 2015
  19. Gabor BernatAug 30, 2015
  20. Mikael MagnussonAug 30, 2015
  21. Eric SunshineAug 30, 2015
  22. Eric SunshineAug 30, 2015
  23. Eric SunshineAug 30, 2015
  24. Junio C HamanoAug 31, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.