Changeset 7f792c1 for global.c


Ignore:
Timestamp:
Jan 22, 2007, 12:20:17 AM (17 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
6837096
Parents:
585bdc3
Message:
* Added idle-time tracking in C.
* Exposed idle-time tracking to perl.
* Updated jabber.pl to set away after 5 minutes, xa after 15 minutes.
* Flipped around the jabber connection manager's hash to index by jid first.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r8fa9562 r7f792c1  
    6969  g->searchstring=NULL;
    7070  g->starttime=time(NULL); /* assumes we call init only a start time */
     71  g->lastinputtime=g->starttime;
    7172  g->newmsgproc_pid=0;
    7273 
     
    438439}
    439440
     441time_t owl_global_get_lastinputtime(owl_global *g) {
     442  return(g->lastinputtime);
     443}
     444
     445void owl_global_update_lastinputtime(owl_global *g) {
     446  g->lastinputtime = time(NULL);
     447}
     448
     449time_t owl_global_get_idletime(owl_global *g) {
     450  return(time(NULL)-g->lastinputtime);
     451}
     452
    440453void owl_global_get_runtime_string(owl_global *g, char *buff) {
    441454  time_t diff;
Note: See TracChangeset for help on using the changeset viewer.