Skip to content
ringostarr80Public

About

This currently very small project was made to wrap some Gnu libc functions to the dotnet-world.

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

148 Commits

Folders and files

Repository files navigation

RL.Gnu.LibC Wrapper

License: CC0 Workflow: CodeQL NuGet Version codecov

Intention

This currently very small project was made to wrap some Gnu libc functions to the dotnet-world. This library doesn't work on Windows.

Usage

to get the load averages:

using System;
using RL.Gnu;

namespace Console
{
    class Program
    {
        static void Main(string[] args)
        {
            // there are different ways to retrieve the load averages.
            // 1. the classical c-way.
            double[] loadavg;
            var samples = LibC.getloadavg(out loadavg, 3);
            if (samples != -1) {
                Console.WriteLine("{0} {1} {2}", loadavg[0], loadavg[1], loadavg[2]);
            }

            // 2. the dotnet-like-way.
            loadavg = LibC.GetLoadAverages();
            Console.WriteLine("{0} {1} {2}", loadavg[0], loadavg[1], loadavg[2]);
        }
    }
}

About

This currently very small project was made to wrap some Gnu libc functions to the dotnet-world.

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages