[Vala] Vala time handling.
- From: Karl Lattimer <karl qdh org uk>
- To: vala-list gnome org
- Subject: [Vala] Vala time handling.
- Date: Mon, 06 Oct 2008 11:58:45 +0100
Hi,
I'm trying to figure out my way around vala's time stuff, but I'm having
a hard time, looking at vapi files isn't great :/
Specifically I want to produce timestamps, generally this is an easy
thing to do in most languages but I'm having a syntactical nightmare
with vala :(
So far I'm doing essentially this;
Time time = Time.local(time_t ());
string stime;
time.strptime(stime, "%s");
or
char[] stime;
time.strftime(stime, "%s");
which I'd imagine would work, however I get;
hellodir.c:38: error: called object ‘time’ is not a function
when trying either of these :/ its especially difficult as the only use
of time I can find is in the clock example, and that doesn't deal with
timestamps at all.
I simply need a unsigned integer out of it, so if someone can post the
correct usage of atoi if its anything other than int = atoi(string);
that would be cool too,
thanks in advance,
BR,
K,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]