How To Install libtime-hr-perl on Debian 10

Learn how to install libtime-hr-perl on Debian 10 with this tutorial. libtime-hr-perl is Perl interface to high-resolution timer

Introduction

In this tutorial we learn how to install libtime-hr-perl on Debian 10.

What is libtime-hr-perl

libtime-hr-perl is:

Time::HR is a very simple interface to high-resolution timer - it only supports one function call - gethrtime(). gethrtime() function returns current high-resolution real time value either as 64-bit integer (on systems with 64-bit support) or double value. Time is expressed as nanoseconds since some arbitrary time in the past; it is not correlated in any way to the time of day, and thus is not subject to resetting or drifting by way of adjtime or settimeofday. The high resolution timer is ideally suited to performance measurement tasks, where cheap, accurate interval timing is required. Currently, this extension is only supported on Solaris, Linux and Cygwin.

There are three methods to install libtime-hr-perl on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libtime-hr-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libtime-hr-perl using apt-get by running the following command:

sudo apt-get -y install libtime-hr-perl

Install libtime-hr-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtime-hr-perl using apt by running the following command:

sudo apt -y install libtime-hr-perl

Install libtime-hr-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libtime-hr-perl using aptitude by running the following command:

sudo aptitude -y install libtime-hr-perl

How To Uninstall libtime-hr-perl on Debian 10

To uninstall only the libtime-hr-perl package we can use the following command:

sudo apt-get remove libtime-hr-perl

Uninstall libtime-hr-perl And Its Dependencies

To uninstall libtime-hr-perl and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libtime-hr-perl

Remove libtime-hr-perl Configurations and Data

To remove libtime-hr-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libtime-hr-perl

Remove libtime-hr-perl configuration, data, and all of its dependencies

We can use the following command to remove libtime-hr-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtime-hr-perl

Dependencies

libtime-hr-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libtime-hr-perl package on Debian 10 using different package management tools: apt, apt-get and aptitude.