<?php

namespace Planaday\Utility\Debug;

use Planaday\Utility\Debug\Log\Logging;

class PluginFeatureTimer {
	use Logging;

	public function start(string $featureName): callable {
		$startTime = microtime(true);
		return fn() => $this->logInfo("Feature $featureName took " . (int)((microtime(true) - $startTime) * 1000) . " milliseconds");
	}
}