Thread View: news.software.readers
3 messages
3 total messages
Started by Thorfinn
Mon, 21 Jun 1999 00:00
OT: slang time_t() function?
Author: Thorfinn
Date: Mon, 21 Jun 1999 00:00
Date: Mon, 21 Jun 1999 00:00
42 lines
2710 bytes
2710 bytes
This is sorta off-topic for news.software.readers, but I can't find a
slang group on my newsserver.
Hrm. JED: Would you object if I started up an RFD and suchlike for
comp.lang.slang, and pushed it through to get a newgroup for it? I
assume there would be interest from here (via slrn) and comp.editors
(via jed)... are there any other applications out there that use
slang, and have existing newsgroups?
Anyway... back what I was going to ask:
I was mucking about trying to find a way to get the current time as a
time_t value from slang... and I can't find one. There's the time()
function, which returns the current time as a string...
I would like a function to return the current time as a time_t value,
as per the same type of values returned in the struct members
st_mtime, st_atime, st_ctime from lstat_file() and similar.
Currently, I'm doing an evil hack, and fishing out the latest atime
value from lstat_file(make_home_filename(".")) ... but that's an ugly
hack which isn't very accurate.
I don't *need* that kind of accuracy (it's only for my
X-Countdown-To-Y2K: header, which is kinda spurious anyway...), but
the correct thing to do is to retrieve the time(2) value.
I can write a patch myself and submit it, if there isn't one currently
available.
Later,
Thorfinn
--
<a href = "http://www.netizen.com.au/"> thorfinn@netizen.com.au </a>
If it [bit of number theory] was UI for you, seek help now. Write a
perl compiler in FORTRAN, or a FORTRAN compiler in perl. Read
contemporary French philosophy. Write a stupid SF novel.
-- Anatoly Vorobey in the scary.devil.monastery
Re: OT: slang time_t() function?
Author: Thorfinn
Date: Mon, 21 Jun 1999 00:00
Date: Mon, 21 Jun 1999 00:00
28 lines
2091 bytes
2091 bytes
In news.software.readers, on 21 Jun 1999 06:24:19 GMT
John E. Davis <davis@space.mit.edu> wrote:
> On 21 Jun 1999 06:00:13 GMT, Thorfinn <thorfinn@netizen.com.au>
> wrote:
> >Hrm. JED: Would you object if I started up an RFD and suchlike for
> >comp.lang.slang, and pushed it through to get a newgroup for it? I
> I have not objections. alt.lang.s-lang exists but not all servers
> carry it.
Ah. *nodnod* I went hunting for "slang", and didn't find alt.lang.s-lang...
Wups. Okay. At *some* point, I'll probably propose comp.lang.slang,
and see how it goes. I'll let people know when I get 'round to it. :)
> USAGE
> ULong_Type _time ()
Updated to slang1.3.7 happily, and that works.
Thanks,
Thorfinn
--
<a href = "http://www.netizen.com.au/"> thorfinn@netizen.com.au </a>
Rivendell household rule #7: Nothing succeeds as planned.
-- Harry Ugol
Re: OT: slang time_t() function?
Author: John E. Davis
Date: Mon, 21 Jun 1999 00:00
Date: Mon, 21 Jun 1999 00:00
40 lines
2054 bytes
2054 bytes
On 21 Jun 1999 06:00:13 GMT, Thorfinn <thorfinn@netizen.com.au> wrote: >This is sorta off-topic for news.software.readers, but I can't find a >slang group on my newsserver. > >Hrm. JED: Would you object if I started up an RFD and suchlike for >comp.lang.slang, and pushed it through to get a newgroup for it? I I have not objections. alt.lang.s-lang exists but not all servers carry it. >I was mucking about trying to find a way to get the current time as a >time_t value from slang... and I can't find one. There's the time() >function, which returns the current time as a string... If using a 1.3.x version of slang, you can use the _time function: _time SYNOPSIS Get the current time in seconds USAGE ULong_Type _time () DESCRIPTION The `_time' function returns the number of elapsed seconds since 00:00:00 GMT, January 1, 1970. The `ctime' function may be used to convert this into a string representation. SEE ALSO ctime, time, localtime, gmtime -- John E. Davis Center for Space Research/AXAF Science Center 617-258-8119 One Hampshire St., Building NE80-6019 http://space.mit.edu/~davis Cambridge, MA 02139-4307
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads