Main function called by the updater thread.
		Direct call is unnecessary.

def main_update(self):
		"""
		Main function called by the updater thread.
		Direct call is unnecessary.
		"""
		# Renice updater thread to limit overload
		try:
			os.nice(1)
		except AttributeError as er:
			pass # os.nice is not available on windows
		time.sleep(self.refresh)

		try:
			while True:
				# We pick a timestamp to take in account the time used by update()
				timestamp=time.time()

				# Update data with user's defined function
				self.update()

				# We use this trick because we cannot use signals in a backoffice threads
				# and alarm() mess up with readline() in the main thread.
				delay=(timestamp+self.refresh)-time.time()
				if delay > 0:
					if delay > self.refresh:
						time.sleep(self.refresh)
					else:
						time.sleep(delay)

				# Commit change exactly every 'refresh' seconds, whatever update() takes long.
				# Commited values are a bit old, but for RRD, punctuals values
				# are better than fresh-but-not-time-constants values.
				self.commit()

		except Exception as e:
			self.error=e
			raise