Jan Danielsson wrote:
> Hello all,
>
>I have a list of servers which an application connects to. If the
> connection fails, the application should mark the server as temporarily
> unavailable, and should try to use the server again after x units of time.
>
> In C, I would do this:
>
> server
Grant Edwards wrote:
>>In C, I would do this:
>>
>>server.invalidUntil = time(NULL) + 5*60; // five minute delay
>
> In Python, I would do this:
>
> server.invalidUntil = time.time() + 5*60 # five minute delay
Ah. Well. Um. I feel like an idiot. I found datetime by accident, and
thought "it
On 2005-06-09, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2005-06-09, Jan Danielsson <[EMAIL PROTECTED]> wrote:
>
>> In C, I would do this:
>>
>> server.invalidUntil = time(NULL) + 5*60; // five minute delay
>
> In Python, I would do this:
>
> server.invalidUntil = time.time() + 5*60 # five min
On 2005-06-09, Jan Danielsson <[EMAIL PROTECTED]> wrote:
> In C, I would do this:
>
> server.invalidUntil = time(NULL) + 5*60; // five minute delay
In Python, I would do this:
server.invalidUntil = time.time() + 5*60 # five minute delay
> ..and the check:
>
> if(time(NULL) > server.invalidUtil
From: Jan Danielsson <[EMAIL PROTECTED]>
To: python-list@python.org
Subject: A question about time
Date: Thu, 09 Jun 2005 22:58:17 +0200
Hello all,
I have a list of servers which an application connects to. If the
connection fails, the application should mark the server as temporarily
una