Commit b7443a17 authored by Per Cederqvist's avatar Per Cederqvist

Use a global variable to store the current time, so that it is never

changes during an atomic call, and so that we don't call time() more
than once per call.
parent 1cd75164
1999-05-16 Per Cederqvist <ceder@lysator.liu.se>
Use a global variable to store the current time, so that it is
never changes during an atomic call, and so that we don't call
time() more than once per call.
* src/server/server-time.h: New file.
* src/server/ramkomd.c (main): Initialize current_time.
* src/server/connections.c (milli_timevaldiff): Removed.
(dump_statistics): Use current_time instead of calling time().
(toploop): Call time once per select loop instead of calling
gettimeofday twice. Simplify the computation of the timeout.
* src/server/conference.c (do_create_conf): Use current_time
instead of time().
* src/server/text.c (add_text_in_conf): Use current_time instead
of calling time().
(do_create_text): Likewise.
(add_recipient): Likewise.
(add_footnote): Likewise.
(add_comment): Likewise.
(create_text_add_miscs): Removed the now argument. All callers
updated. User current_time instead of now.
* src/server/text-garb.c (garb_text): Use current_time instead of
calling time().
* src/server/simple-cache.c (sync_part): Use current_time instead
of calling time().
(init_cache): Likewise.
* src/server/session.c (leave_conf): Use current_time instead of
calling time().
(login_old): Likewise.
(login): Likewise.
(logout): Likewise.
(who_is_on_dynamic): Likewise.
(get_session_info): Likewise.
(get_session_info_ident): Likewise.
(get_time): Likewise.
(user_active): Likewise.
* src/server/send-async.c (async_rejected_connection): Use
current_time instead of calling time().
* src/server/person.c (create_person_generic): Use
current_time instead of calling time().
* src/server/membership.c (do_add_rec_time): Use
current_time instead of calling time().
(do_add_member): Likewise.
* src/server/internal-connections.c (init_connection): Use
current_time instead of calling time().
(new_client): Likewise.
* src/server/aux-items.h: (prepare_aux_item_list): Removed the
"now" argument.
(prepare_aux_item): Likewise.
* src/server/aux-items.c (prepare_aux_item_list): Removed the
"now" argument. Use current_time instead. Call callers updated.
(prepare_aux_item): Likewise.
* src/server/admin.c (modify_server_info): Don't pass the current
time to prepare_aux_item_list.
Document updateLysKOM and komrunning. Make them accept -v/-V.
* doc/lyskomd.texi: Removed all up, next and prev pointers.
(Invoking updateLysKOM): New node.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment