(file) Return to timehires.pm CVS log (file) (dir) Up to [RizwankCVS] / geekymedia_web / awstats-6.3 / wwwroot / cgi-bin / plugins

 1 rizwank 1.1 #!/usr/bin/perl
 2             #-----------------------------------------------------------------------------
 3             # TimeHires AWStats plugin
 4             # Change time accuracy in showsteps option from seconds to milliseconds
 5             #-----------------------------------------------------------------------------
 6             # Perl Required Modules: Time::HiRes
 7             #-----------------------------------------------------------------------------
 8             # $Revision: 1.10 $ - $Author: eldy $ - $Date: 2003/07/26 15:32:31 $
 9             
10             
11             # <-----
12             # ENTER HERE THE USE COMMAND FOR ALL REQUIRED PERL MODULES
13             if (!eval ('require "Time/HiRes.pm"')) { return $@?"Error: $@":"Error: Need Perl module Time::HiRes"; }
14             # ----->
15             use strict;no strict "refs";
16             
17             
18             
19             #-----------------------------------------------------------------------------
20             # PLUGIN VARIABLES
21             #-----------------------------------------------------------------------------
22 rizwank 1.1 # <-----
23             # ENTER HERE THE MINIMUM AWSTATS VERSION REQUIRED BY YOUR PLUGIN
24             # AND THE NAME OF ALL FUNCTIONS THE PLUGIN MANAGE.
25             my $PluginNeedAWStatsVersion="5.1";
26             my $PluginHooksFunctions="GetTime";
27             # ----->
28             
29             
30             
31             #-----------------------------------------------------------------------------
32             # PLUGIN FUNCTION: Init_pluginname
33             #-----------------------------------------------------------------------------
34             sub Init_timehires {
35             	my $InitParams=shift;
36             	my $checkversion=&Check_Plugin_Version($PluginNeedAWStatsVersion);
37             
38             	# <-----
39             	# ENTER HERE CODE TO DO INIT PLUGIN ACTIONS
40             	# ----->
41             
42             	return ($checkversion?$checkversion:"$PluginHooksFunctions");
43 rizwank 1.1 }
44             
45             
46             #-----------------------------------------------------------------------------
47             # PLUGIN FUNCTION: GetTime_pluginname
48             # UNIQUE: YES (Only one plugin using this function can be loaded)
49             #-----------------------------------------------------------------------------
50             sub GetTime_timehires {
51             	my ($sec,$msec)=Time::HiRes::gettimeofday();
52             	$_[0]=$sec;
53             	$_[1]=$msec;
54             }
55             
56             
57             1;	# Do not remove this line

Rizwan Kassim
Powered by
ViewCVS 0.9.2