XRootD
Loading...
Searching...
No Matches
XrdClFileTimer.cc
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// Copyright (c) 2013 by European Organization for Nuclear Research (CERN)
3// Author: Lukasz Janyst <ljanyst@cern.ch>
4//------------------------------------------------------------------------------
5// XRootD is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// XRootD is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17//------------------------------------------------------------------------------
18
23
24namespace XrdCl
25{
26 //----------------------------------------------------------------------------
27 // Perform the task's action
28 //----------------------------------------------------------------------------
29 time_t FileTimer::Run( time_t now )
30 {
31 pMutex.Lock();
32 std::set<FileStateHandler*>::iterator it;
33 for( it = pFileObjects.begin(); it != pFileObjects.end(); ++it )
34 (*it)->Tick(now);
35 pMutex.UnLock();
36 Env *env = DefaultEnv::GetEnv();
37 int timeoutResolution = DefaultTimeoutResolution;
38 env->GetInt( "TimeoutResolution", timeoutResolution );
39 return now+timeoutResolution;
40 }
41}
static Env * GetEnv()
Get default client environment.
bool GetInt(const std::string &key, int &value)
Definition XrdClEnv.cc:89
virtual time_t Run(time_t now)
Perform the task's action.
const int DefaultTimeoutResolution